RadMenuItem
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
Initializes a new instance of the RadMenuItem class.
public RadMenuItem()
Initializes a new instance of the RadMenuItem class using the displayed text.
Fields
public static readonly ActivateMenuItemCommand ActivateMenuItemCommand
public static RadProperty CheckStateProperty
public static RadProperty DescriptionFontProperty
public static RadProperty DescriptionTextVisibleProperty
public static RadProperty HintTextProperty
public static RadProperty ShowArrowProperty
Properties
Gets or sets the name of the control for use by accessibility client applications.
public override string AccessibleName { get; set; }
Overrides:
Gets the BorderPrimitive of RadMenuItem responsible for appearance of the border.
[Browsable(true)]
public BorderPrimitive BorderPrimitive { get; }
Gets or sets a value indicating whether a menu item should toggle its CheckState on mouse click.
[Browsable(true)]
public bool CheckOnClick { get; set; }
Gets or sets the font of the descrition text of the RadMenuItem.
public virtual Font DescriptionFont { get; set; }
Gets or sets the description text associated with this item.
[Browsable(true)]
[Bindable(true)]
[SettingsBindable(true)]
public string DescriptionText { get; set; }
Gets the visibility of description text element
public virtual bool DescriptionTextVisible { get; }
Gets the FillPrimitive of RadMenuItem responsible for the background appearance.
[Browsable(true)]
public FillPrimitive FillPrimitive { get; }
Gets or sets the text that appears as a HintText for a menu item.
[Browsable(true)]
public string HintText { get; set; }
Gets or sets the index value of the image that is displayed on the item.
[Browsable(true)]
[RelatedImageList("OwnerControl.ImageList")]
public override int ImageIndex { get; set; }
Overrides:
Gets or sets the key accessor for the image in the ImageList.
[Browsable(true)]
[RelatedImageList("OwnerControl.ImageList")]
public override string ImageKey { get; set; }
Overrides:
Gets or sets a value indicating whether the menu item is checked.
[Browsable(true)]
[Bindable(true)]
public virtual bool IsChecked { get; set; }
public virtual RadMenuItemLayout Layout { get; }
public virtual RadElement LeftColumnElement { get; }
public virtual RadDropDownMenuLayout MenuLayout { get; }
Gets or sets the position of a merged item within the current menu.
[Browsable(true)]
public int MergeIndex { get; set; }
public virtual RadElement RightColumnElement { get; }
Gets or sets if the arrow is shown when the menu item contains sub menu.
[Browsable(true)]
public bool ShowArrow { get; set; }
Gets or sets the visibility of the separator element between the text and the description text
public virtual ElementVisibility TextSeparatorVisibility { get; set; }
Gets or sets the Telerik.WinControls.Enumerations.ToggleState?text=toggle ++++++++++++++++state. Toggle state enumeration defines the following values: Off, Indeterminate, and On.
[Browsable(true)]
[Bindable(true)]
public ToggleState ToggleState { get; set; }
Methods
protected override bool CanHandleShortcut(ShortcutEventArgs e)
Overrides:
Allows inheritors to force a coersion of the current calculated value for the given property.
protected override object CoerceValue(RadPropertyValue propVal, object baseValue)
The property value.
baseValueobjectThe current caluclated value of the property.
Returns:Null if no coersion is needed.
Overrides:
Called by the element when constructed. Allows inheritors to build the element tree.
protected override void CreateChildElements()
Overrides:
Disposes managed resources, including the associated image if it's not shared with other items.
protected override void DisposeManagedResources()
Overrides:
Determines whether the arrow is currently displayed for this item.
Initializes the internal state fields for the button item, setting default values for shared image and capture behavior.
protected override void InitializeFields()
Overrides:
protected virtual void ItemsChanged(RadItemCollection changed, RadItem target, ItemsChangeOperation operation)
protected override void OnDropDownCreated()
Overrides:
Handles property changes, specifically releasing the pressed state when the button is disabled.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The RadPropertyChangedEventArgs containing event data.
Overrides:
Raises the ToggleStateChanged event.
protected virtual void OnToggleStateChanged(StateChangedEventArgs e)
Raises the ToggleStateChanging event.
protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
protected virtual ArrowDirection TranslateArrowDirection(RadDirection dropdownDirection)
protected override void UpdateOnShortcutsChanged()
Overrides:
Events
Occurs when the item's toggle state changes.
[Browsable(true)]
public event StateChangedEventHandler ToggleStateChanged
Occurs before the item's toggle state changes.
[Browsable(true)]
public event StateChangingEventHandler ToggleStateChanging