ClassRadMenuItem
Represents a selectable option displayed on a RadMenuElement or in a drop down panel.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[ComVisible(false)]
[RadNewItem("Add New Item", true)]
public class RadMenuItem : RadMenuItemBase, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IButtonControl, IImageElement, IHierarchicalItem, IItemsOwner, ISiteProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadButtonItemRadMenuItemBaseRadMenuItem
Derived Classes:
Implements:
Inherited Members
Constructors
RadMenuItem()
Initializes a new instance of the RadMenuItem class.
Declaration
public RadMenuItem()
RadMenuItem(string)
Initializes a new instance of the RadMenuItem class using the displayed text.
RadMenuItem(string, object)
Initializes a new instance of the RadMenuItem class using the displayed text.
Fields
ActivateMenuItemCommand
Declaration
public static readonly ActivateMenuItemCommand ActivateMenuItemCommand
Field Value
DescriptionFontProperty
Declaration
public static RadProperty DescriptionFontProperty
Field Value
DescriptionTextVisibleProperty
Declaration
public static RadProperty DescriptionTextVisibleProperty
Field Value
Properties
AccessibleName
Gets or sets the name of the control for use by accessibility client applications.
Declaration
public override string AccessibleName { get; set; }
Property Value
Overrides
BorderPrimitive
Gets the BorderPrimitive of RadMenuItem responsible for appearance of the border.
Declaration
[Browsable(true)]
public BorderPrimitive BorderPrimitive { get; }
Property Value
CheckOnClick
Gets or sets a value indicating whether a menu item should toggle its CheckState on mouse click.
Declaration
[Browsable(true)]
public bool CheckOnClick { get; set; }
Property Value
DescriptionFont
Gets or sets the font of the descrition text of the RadMenuItem.
DescriptionText
Gets or sets the description text associated with this item.
Declaration
[Browsable(true)]
[Bindable(true)]
[SettingsBindable(true)]
public string DescriptionText { get; set; }
Property Value
DescriptionTextVisible
Gets the visibility of description text element
Declaration
public virtual bool DescriptionTextVisible { get; }
Property Value
FillPrimitive
Gets the FillPrimitive of RadMenuItem responsible for the background appearance.
Declaration
[Browsable(true)]
public FillPrimitive FillPrimitive { get; }
Property Value
HintText
Gets or sets the text that appears as a HintText for a menu item.
Declaration
[Browsable(true)]
public string HintText { get; set; }
Property Value
ImageIndex
Gets or sets the index value of the image that is displayed on the item.
Declaration
[Browsable(true)]
[RelatedImageList("OwnerControl.ImageList")]
public override int ImageIndex { get; set; }
Property Value
Overrides
ImageKey
Gets or sets the key accessor for the image in the ImageList.
Declaration
[Browsable(true)]
[RelatedImageList("OwnerControl.ImageList")]
public override string ImageKey { get; set; }
Property Value
Overrides
IsChecked
Gets or sets a value indicating whether the menu item is checked.
Declaration
[Browsable(true)]
[Bindable(true)]
public virtual bool IsChecked { get; set; }
Property Value
Layout
Declaration
public virtual RadMenuItemLayout Layout { get; }
Property Value
LeftColumnElement
Declaration
public virtual RadElement LeftColumnElement { get; }
Property Value
MenuLayout
Declaration
public virtual RadDropDownMenuLayout MenuLayout { get; }
Property Value
MergeIndex
Gets or sets the position of a merged item within the current menu.
Declaration
[Browsable(true)]
public int MergeIndex { get; set; }
Property Value
RightColumnElement
Declaration
public virtual RadElement RightColumnElement { get; }
Property Value
ShowArrow
Gets or sets if the arrow is shown when the menu item contains sub menu.
Declaration
[Browsable(true)]
public bool ShowArrow { get; set; }
Property Value
TextSeparatorVisibility
Gets or sets the visibility of the separator element between the text and the description text
Declaration
public virtual ElementVisibility TextSeparatorVisibility { get; set; }
Property Value
ToggleState
Gets or sets the Telerik.WinControls.Enumerations.ToggleState?text=toggle ++++++++++++++++state. Toggle state enumeration defines the following values: Off, Indeterminate, and On.
Declaration
[Browsable(true)]
[Bindable(true)]
public ToggleState ToggleState { get; set; }
Property Value
Methods
CanHandleShortcut(ShortcutEventArgs)
Declaration
protected override bool CanHandleShortcut(ShortcutEventArgs e)
Parameters
e
Returns
Overrides
CoerceValue(RadPropertyValue, object)
Allows inheritors to force a coersion of the current calculated value for the given property.
Declaration
protected override object CoerceValue(RadPropertyValue propVal, object baseValue)
Parameters
propVal
The property value.
baseValue
The current caluclated value of the property.
Returns
Null if no coersion is needed.
Overrides
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
DisposeManagedResources()
Disposes managed resources, including the associated image if it's not shared with other items.
Declaration
protected override void DisposeManagedResources()
Overrides
GetArrowVisible()
Determines whether the arrow is currently displayed for this item.
InitializeFields()
Initializes the internal state fields for the button item, setting default values for shared image and capture behavior.
Declaration
protected override void InitializeFields()
Overrides
ItemsChanged(RadItemCollection, RadItem, ItemsChangeOperation)
Declaration
protected virtual void ItemsChanged(RadItemCollection changed, RadItem target, ItemsChangeOperation operation)
Parameters
changed
target
operation
OnBitStateChanged(long, bool, bool)
Notifies the object for a change in its bit state.
OnClick(EventArgs)
Handles the click event, managing dialog result assignment and ensuring proper form behavior for button controls.
OnDropDownCreated()
Declaration
protected override void OnDropDownCreated()
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property changes, specifically releasing the pressed state when the button is disabled.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
The RadPropertyChangedEventArgs containing event data.
Overrides
OnToggleStateChanged(StateChangedEventArgs)
Raises the ToggleStateChanged event.
Declaration
protected virtual void OnToggleStateChanged(StateChangedEventArgs e)
Parameters
e
OnToggleStateChanging(StateChangingEventArgs)
Raises the ToggleStateChanging event.
Declaration
protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
Parameters
e
TranslateArrowDirection(RadDirection)
Declaration
protected virtual ArrowDirection TranslateArrowDirection(RadDirection dropdownDirection)
Parameters
dropdownDirection
Returns
UpdateOnShortcutsChanged()
Declaration
protected override void UpdateOnShortcutsChanged()
Overrides
Events
ToggleStateChanged
Occurs when the item's toggle state changes.
Declaration
[Browsable(true)]
public event StateChangedEventHandler ToggleStateChanged
Event Value
ToggleStateChanging
Occurs before the item's toggle state changes.
Declaration
[Browsable(true)]
public event StateChangingEventHandler ToggleStateChanging
Event Value