Class RadMenu
Represents a menu. RadMenu can be horizontal or vertical. You can add, remove, and disable menu items at run-time. It offers full theming support, 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.
RadMenu is a simple wrapper for the RadMenuElement class.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Menus & Toolbars")]
public class RadMenu : RadItemsControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, IItemsControl, IMessageListener
Constructors
RadMenu()
Initializes a new instance of the RadMenu class. RadMenu can be horizontal or vertical. You can add, remove, and disable menu items at run-time. It offers full theming support, 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.
Declaration
public RadMenu()
Properties
AllItemsEqualHeight
Declaration
[RadDescription("AllItemsEqualHeight", typeof(RadMenuElement))]
[RadDefaultValue("AllItemsEqualHeight", typeof(RadMenuElement))]
public bool AllItemsEqualHeight { get; set; }
Property Value
System.Boolean
|
AllowMerge
Declaration
public bool AllowMerge { get; set; }
Property Value
System.Boolean
|
AutoSize
Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean
|
Overrides
BackColor
RadMenu consists of multiple visual elements and separate settings are provided to customize their appearance. Current BackColor property might be ignored.
Declaration
public override Color BackColor { get; set; }
Property Value
System.Drawing.Color
|
Overrides
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
Dock
Declaration
public override DockStyle Dock { get; set; }
Property Value
System.Windows.Forms.DockStyle
|
DropDownAnimationEasing
Declaration
[RadDefaultValue("DropDownAnimationEasing", typeof(RadMenuElement))]
public RadEasingType DropDownAnimationEasing { get; set; }
Property Value
RadEasingType
|
DropDownAnimationEnabled
Declaration
[RadDefaultValue("DropDownAnimationEnabled", typeof(RadMenuElement))]
public bool DropDownAnimationEnabled { get; set; }
Property Value
System.Boolean
|
DropDownAnimationFrames
Declaration
[RadDefaultValue("DropDownAnimationFrames", typeof(RadMenuElement))]
public int DropDownAnimationFrames { get; set; }
Property Value
System.Int32
|
ForeColor
RadMenu consists of multiple visual elements and separate settings are provided to customize their appearance. Current ForeColor property might be ignored.
Declaration
public override Color ForeColor { get; set; }
Property Value
System.Drawing.Color
|
Overrides
IsMainMenu
Gets or sets boolean value that determines whether RadMenu handles the MDI menu functionality.
Declaration
public bool IsMainMenu { get; set; }
Property Value
System.Boolean
|
Items
Declaration
[RadEditItemsAction]
[RadNewItem("Type here", true, true, false)]
public override RadItemOwnerCollection Items { get; }
Property Value
RadItemOwnerCollection
|
Overrides
MenuElement
Gets the instance of RadMenuElement wrapped by this control. RadMenuElement is the main element in the hierarchy tree and encapsulates the actual functionality of RadMenu.
Declaration
public RadMenuElement MenuElement { get; }
Property Value
RadMenuElement
|
Orientation
Declaration
[RadDescription("Orientation", typeof(RadMenuElement))]
[RadDefaultValue("Orientation", typeof(RadMenuElement))]
public Orientation Orientation { get; set; }
Property Value
System.Windows.Forms.Orientation
|
StretchItems
Indicates whether the menu items should be stretched to fill the available space.
Declaration
public bool StretchItems { get; set; }
Property Value
System.Boolean
|
SystemKeyHighlight
Gets or sets whether the Alt or F10 keys can be used to highlight the menu.
Declaration
public bool SystemKeyHighlight { get; set; }
Property Value
System.Boolean
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
Methods
CallBaseProcessDialogKey(Keys)
Declaration
protected override bool CallBaseProcessDialogKey(Keys keyData)
Parameters
System.Windows.Forms.Keys
keyData
|
Returns
System.Boolean
|
Overrides
CanProcessItem(RadMenuItemBase)
Declaration
protected virtual bool CanProcessItem(RadMenuItemBase menuItem)
Parameters
RadMenuItemBase
menuItem
|
Returns
System.Boolean
|
CanProcessMnemonic(Char)
Declaration
public override bool CanProcessMnemonic(char keyData)
Parameters
System.Char
keyData
|
Returns
System.Boolean
|
Overrides
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
System.Windows.Forms.AccessibleObject
|
CreateChildItems(RadElement)
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
|
Overrides
CreateRootElement()
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
|
Overrides
GetCurrentProcessedItem(IItemsControl)
Declaration
protected virtual RadMenuItemBase GetCurrentProcessedItem(IItemsControl itemsControl)
Parameters
IItemsControl
itemsControl
|
Returns
RadMenuItemBase
|
GetSysCharItem(IItemsControl, Char)
Declaration
protected virtual RadMenuItemBase GetSysCharItem(IItemsControl itemsControl, char searchKey)
Parameters
IItemsControl
itemsControl
|
System.Char
searchKey
|
Returns
RadMenuItemBase
|
InitializeRootElement(RootRadElement)
Declaration
protected override void InitializeRootElement(RootRadElement rootElement)
Parameters
RootRadElement
rootElement
|
Overrides
MergeMenu(RadMenu)
OnAllItemsEqualHeightChanged(EventArgs)
Declaration
protected virtual void OnAllItemsEqualHeightChanged(EventArgs args)
Parameters
System.EventArgs
args
|
OnHandleCreated(EventArgs)
Declaration
protected override void OnHandleCreated(EventArgs e)
Parameters
System.EventArgs
e
|
OnHandleDestroyed(EventArgs)
Declaration
protected override void OnHandleDestroyed(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnItemDeselected(ItemSelectedEventArgs)
Declaration
protected override void OnItemDeselected(ItemSelectedEventArgs args)
Parameters
ItemSelectedEventArgs
args
|
Overrides
OnItemSelected(ItemSelectedEventArgs)
Declaration
protected override void OnItemSelected(ItemSelectedEventArgs args)
Parameters
ItemSelectedEventArgs
args
|
Overrides
OnLeave(EventArgs)
Declaration
protected override void OnLeave(EventArgs e)
Parameters
System.EventArgs
e
|
OnLoad(Size)
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.Drawing.Size
desiredSize
|
Overrides
OnMenuStateChanged(RadMenu.RadMenuState, RadMenu.RadMenuState)
Declaration
protected virtual void OnMenuStateChanged(RadMenu.RadMenuState oldState, RadMenu.RadMenuState newState)
Parameters
RadMenu.RadMenuState
oldState
|
RadMenu.RadMenuState
newState
|
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnOrientationChanged(EventArgs)
Declaration
protected virtual void OnOrientationChanged(EventArgs args)
Parameters
System.EventArgs
args
|
OnTextOrientationChanged(EventArgs)
Declaration
protected virtual void OnTextOrientationChanged(EventArgs args)
Parameters
System.EventArgs
args
|
PerformMouseDown(RadMenuItemBase)
Declaration
protected virtual void PerformMouseDown(RadMenuItemBase menuItem)
Parameters
RadMenuItemBase
menuItem
|
PreprocessMouseEvent(ref Message)
Declaration
protected virtual void PreprocessMouseEvent(ref Message msg)
Parameters
System.Windows.Forms.Message
msg
|
ProcessArrowKey(Keys)
Declaration
protected override bool ProcessArrowKey(Keys keyCode)
Parameters
System.Windows.Forms.Keys
keyCode
|
Returns
System.Boolean
|
Overrides
ProcessAutoSizeChanged(Boolean)
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
System.Boolean
value
|
Overrides
ProcessCmdKey(ref Message, Keys)
Declaration
protected override bool ProcessCmdKey(ref Message m, Keys keyData)
Parameters
System.Windows.Forms.Message
m
|
System.Windows.Forms.Keys
keyData
|
Returns
System.Boolean
|
Overrides
ProcessCodedUIMessage(ref IPCMessage)
Declaration
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Parameters
IPCMessage
request
|
Overrides
ProcessDialogKey(Keys)
Declaration
protected override bool ProcessDialogKey(Keys keyData)
Parameters
System.Windows.Forms.Keys
keyData
|
Returns
System.Boolean
|
Overrides
ProcessFirstStageMnemonicActivation(ref Message, Keys)
Declaration
protected virtual bool ProcessFirstStageMnemonicActivation(ref Message m, Keys keyData)
Parameters
System.Windows.Forms.Message
m
|
System.Windows.Forms.Keys
keyData
|
Returns
System.Boolean
|
ProcessFocusRequested(RadElement)
Declaration
protected override bool ProcessFocusRequested(RadElement element)
Parameters
RadElement
element
|
Returns
System.Boolean
|
Overrides
ProcessLeftRightArrowKey(Boolean)
Declaration
protected override bool ProcessLeftRightArrowKey(bool right)
Parameters
System.Boolean
right
|
Returns
System.Boolean
|
Overrides
ProcessMnemonic(Char)
Declaration
protected override bool ProcessMnemonic(char charCode)
Parameters
System.Char
charCode
|
Returns
System.Boolean
|
Overrides
ProcessSecondStageMnemonicActivation(ref Message, Keys)
Declaration
protected virtual bool ProcessSecondStageMnemonicActivation(ref Message m, Keys keyData)
Parameters
System.Windows.Forms.Message
m
|
System.Windows.Forms.Keys
keyData
|
Returns
System.Boolean
|
ProcessUpDownArrowKey(Boolean)
Declaration
protected override bool ProcessUpDownArrowKey(bool down)
Parameters
System.Boolean
down
|
Returns
System.Boolean
|
Overrides
ResetBackColorThemeOverrides()
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetMenuState(RadMenu.RadMenuState)
Declaration
public void SetMenuState(RadMenu.RadMenuState state)
Parameters
RadMenu.RadMenuState
state
|
UnmergeMenu(RadMenu)
Events
AllItemsEqualHeightChanged
Declaration
[RadDescription("AllItemsEqualHeightChanged", typeof(RadMenuElement))]
public event EventHandler AllItemsEqualHeightChanged
Event Type
System.EventHandler
|
OrientationChanged
Declaration
[RadDescription("OrientationChanged", typeof(RadMenuElement))]
public event EventHandler OrientationChanged
Event Type
System.EventHandler
|
TextOrientationChanged
Declaration
public event EventHandler TextOrientationChanged
Event Type
System.EventHandler
|
Explicit Interface Implementations
IMessageListener.DesiredHook
IMessageListener.PreviewMessage(ref Message)
Declaration
MessagePreviewResult IMessageListener.PreviewMessage(ref Message msg)
Parameters
System.Windows.Forms.Message
msg
|
Returns
MessagePreviewResult
|
Implements
IMessageListener.PreviewSystemMessage(SystemMessage, Message)
Declaration
void IMessageListener.PreviewSystemMessage(SystemMessage message, Message msg)
Parameters
SystemMessage
message
|
System.Windows.Forms.Message
msg
|
Implements
IMessageListener.PreviewWndProc(Message)
Declaration
void IMessageListener.PreviewWndProc(Message msg)
Parameters
System.Windows.Forms.Message
msg
|