Class RadMenuElement
Represents a menu. It may be nested in other telerik controls. RadMenu can be horizontal or vertical. You can add, remove, and disable menu items at run-time. It offers full support for the Telerik RadControls for WinForm theming engine, allowing you to easily construct a variety of stunning visual effects. You can nest any other RadControl within a RadMenu . For example, you can create a menu with an embedded textbox or combobox.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadMenuElement : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode
Constructors
RadMenuElement()
Declaration
public RadMenuElement()
Fields
AllItemsEqualHeightProperty
DropDownAnimationEasingProperty
DropDownAnimationEnabledProperty
DropDownAnimationFramesProperty
OrientationProperty
Properties
AllItemsEqualHeight
Gets or sets whether all items will appear with the same size (the size of the highest item in the collection).
Declaration
[RadPropertyDefaultValue("AllItemsEqualHeight", typeof(RadMenuElement))]
public bool AllItemsEqualHeight { get; set; }
Property Value
System.Boolean
|
AllowMerge
Declaration
public bool AllowMerge { get; set; }
Property Value
System.Boolean
|
CloseButton
Declaration
public RadImageButtonElement CloseButton { get; set; }
Property Value
RadImageButtonElement
|
ContextItem
Gets or sets the context items.
Declaration
public RadMenuItemBase ContextItem { get; set; }
Property Value
RadMenuItemBase
|
DropDownAnimationEasing
Gets or sets the type of the DropDown animation.
Declaration
[RadPropertyDefaultValue("DropDownAnimationEasing", typeof(RadMenuElement))]
public RadEasingType DropDownAnimationEasing { get; set; }
Property Value
RadEasingType
|
DropDownAnimationEnabled
Gets or sets a value indicating whether the DropDown animation will be enabled when it shows.
Declaration
[RadPropertyDefaultValue("DropDownAnimationEnabled", typeof(RadMenuElement))]
public bool DropDownAnimationEnabled { get; set; }
Property Value
System.Boolean
|
DropDownAnimationFrames
Gets or sets the number of frames that will be used when the DropDown is being animated.
Declaration
[RadPropertyDefaultValue("DropDownAnimationFrames", typeof(RadMenuElement))]
public int DropDownAnimationFrames { get; set; }
Property Value
System.Int32
|
Items
Gets all root menu items (see RadMenuItemBase for more information about menu items).
Declaration
[RadNewItem("Type here", true)]
public RadItemOwnerCollection Items { get; }
Property Value
RadItemOwnerCollection
|
Remarks
Root menu items are these menu items that can be displayed in the menu when nothing is dropped down.
Menu items are hierarchical items - they have a parent item and a list of children items. Children items are menu items that can be dropped down as submenu of their parent. The difference between the root and the non-root menu items is that root items have no parent item (the property IsRootItem can be used to check if an item is a root one).
Note that Items contains all root menu items, not just the items that are displayed. An item remains in the Items collection even if it is an overflow item and is therefore not currently visible.
See Also
ItemsLayout
Gets an instance of the WrapLayoutPanel class that represents the layout panel in which the menu items reside.
Declaration
public WrapLayoutPanel ItemsLayout { get; }
Property Value
WrapLayoutPanel
|
MaximizeButton
Declaration
public RadImageButtonElement MaximizeButton { get; set; }
Property Value
RadImageButtonElement
|
MenuBorder
Gets an instance of the BorderPrimitiveclass that represents the border of the menu.
Declaration
public BorderPrimitive MenuBorder { get; }
Property Value
BorderPrimitive
|
MenuFill
Gets an instance of the FillPrimitiveclass that represents the menu background fill.
Declaration
public FillPrimitive MenuFill { get; }
Property Value
FillPrimitive
|
MinimizeButton
Declaration
public RadImageButtonElement MinimizeButton { get; set; }
Property Value
RadImageButtonElement
|
Orientation
Gets or sets the System.Windows.Forms.Orientation of menu items - Horizontal or Vertical.
Declaration
[RadPropertyDefaultValue("Orientation", typeof(RadMenuElement))]
public Orientation Orientation { get; set; }
Property Value
System.Windows.Forms.Orientation
|
SystemButtons
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
Overrides
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
InitializeFields()
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
OnAllItemsEqualHeightChanged(EventArgs)
Raises the AllItemsEqualHeightChanged event.
Declaration
protected virtual void OnAllItemsEqualHeightChanged(EventArgs args)
Parameters
System.EventArgs
args
An System.EventArgs that contains the event data. |
OnOrientationChanged(EventArgs)
Raises the OrientationChanged event.
Declaration
protected virtual void OnOrientationChanged(EventArgs args)
Parameters
System.EventArgs
args
An System.EventArgs that contains the event data. |
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
Overrides
OnTunnelEvent(RadElement, RoutedEventArgs)
Declaration
protected override void OnTunnelEvent(RadElement sender, RoutedEventArgs args)
Parameters
RadElement
sender
|
RoutedEventArgs
args
|
Overrides
Events
AllItemsEqualHeightChanged
Occurs when the menu AllItemsEqualHeight property value changes.
Declaration
public event EventHandler AllItemsEqualHeightChanged
Event Type
System.EventHandler
|
OrientationChanged
Occurs when the menu Orientation property value changes.
Declaration
public event EventHandler OrientationChanged
Event Type
System.EventHandler
|