RadMenuItemBase
Represents a base class for the RadMenuItem class.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class RadMenuItemBase : RadButtonItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IButtonControl, IImageElement, IHierarchicalItem, IItemsOwner, ISiteProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadButtonItemRadMenuItemBase...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadMenuItemBase class.
public RadMenuItemBase()
Fields
Identifies the read-only state that indicates whether this item's child popup is shown.
public static readonly RadProperty IsPopupShownProperty
Identifies the property used to choose the direction in which this item's child popup opens.
public static readonly RadProperty PopupDirectionProperty
protected MouseButtons pressedButton
Identifies the Selected property in the RadElement property system.
public static readonly RadProperty SelectedProperty
Properties
Gets the drop down menu associated with this menu item
[Browsable(false)]
public RadDropDownMenu DropDown { get; }
Gets or sets menu header column image
public Image DropDownHeaderImage { get; set; }
Gets or sets menu header column text
public string DropDownHeaderText { get; set; }
Gets or sets whether this item handles keyboard input within its menu hierarchy.
[Browsable(false)]
public virtual bool HandlesKeyboard { get; set; }
Gets a values indicating whether this item has child items to show.
[Browsable(false)]
public virtual bool HasChildItemsToShow { get; }
Gets a value indicating whether this item has child items.
[Browsable(false)]
public bool HasChildren { get; }
Implements:
Gets or sets the parent menu item.
[Browsable(false)]
public IHierarchicalItem HierarchyParent { get; set; }
Implements:
Gets or sets whether this item is a root item in a RadMenu. Root-item status affects popup alignment and the default arrow visibility.
[Browsable(false)]
public bool IsMainMenuItem { get; set; }
Gets whether this item belongs to a drop-down menu layout rather than the root menu layout.
[Browsable(false)]
public bool IsOnDropDown { get; }
Gets a value indiciating that the popup containing this menu item's children is shown.
[Browsable(true)]
public bool IsPopupShown { get; }
Gets a value indicating whether this item is in the root items collection.
[Browsable(false)]
public bool IsRootItem { get; }
Implements:
Gets a collection of the child items.
public RadItemOwnerCollection Items { get; }
Implements:
Gets or sets whether this item represents the MDI window list in a RadMenu. When enabled, the menu populates this item's children with entries for MDI child forms.
public bool MdiList { get; set; }
Gets or sets the relative insertion order used when this item is added during a menu merge.
public int MergeOrder { get; set; }
Gets or sets how this item is combined with a matching item when menus are merged.
public MenuMerge MergeType { get; set; }
Gets the next child item in the parent item's Items collection.
[Browsable(false)]
public RadItem Next { get; }
Implements:
Gets the owner associated with the root of this item's hierarchy. Setting the value affects only an item without a HierarchyParent.
[Browsable(false)]
public object Owner { get; set; }
Implements:
Returns the control that owns this item. This can be a RadMenu or RadDropDownMenu.
[Browsable(false)]
public virtual Control OwnerControl { get; }
Gets or sets the direction of the popup which is opened by this menu item.
[Browsable(true)]
public RadDirection PopupDirection { get; set; }
Gets the previous child item in the parent item's Items collection.
[Browsable(false)]
public RadItem Previous { get; }
Implements:
Gets the root item in this item's hierarchy, or null if no parent is assigned.
public IHierarchicalItem RootItem { get; }
Implements:
Gets or sets whether this item is selected; the value can be inherited through the element tree.
[Browsable(false)]
public bool Selected { get; set; }
Gets the component-tree handler of the parent menu item so shortcuts are registered with the menu hierarchy.
protected override IComponentTreeHandler ShortcutsHandler { get; }
Overrides:
Methods
Chooses popup alignment from the menu orientation when PopupDirection has not been explicitly set.
protected virtual void AdjustDropDownAlignmentForOrientation()
Aligns the child popup according to the explicitly selected PopupDirection.
protected virtual void AdjustDropDownAlignmentForPopupDirection()
Copies the animation settings from the owning RadMenu or RadDropDownMenu to the child popup.
protected virtual void AdjustDropDownAnimations()
Creates the child popup, using a menu supplied by DropDownCreating when the event provides one.
protected virtual RadDropDownMenu CreateDropDownMenu()
The popup menu associated with this item.
Releases the lazily created drop-down and cached accessibility object before delegating to the base implementation.
protected override void DisposeManagedResources()
Overrides:
Creates the child popup on first use, wires its lifecycle events, and invokes OnDropDownCreated().
protected virtual void EnsureDropDownCreated()
Returns the item content bounds after removing its padding and border thickness.
protected override RectangleF GetClientRectangle(SizeF finalSize)
The final size allocated to this item.
Returns:The rectangle available to the item's content.
Overrides:
Gets this item's design-time site, falling back to the first child item's site when available.
Closes the RadMenuItemBase popup.
public virtual void HideChildItems()
Sets menu-item defaults for mouse capture, click handling, styling, and click timing.
protected override void InitializeFields()
Overrides:
Tracks bubbled click events and selects this item in the designer when it belongs to a hosted drop-down menu.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
Overrides:
Ignores non-left mouse clicks before delegating click processing to the base item.
Closes open popups when a hosted menu item is double-clicked in the designer.
Raises the DropDownClosed event.
protected virtual void OnDropDownClosed(RadPopupClosedEventArgs args)
An EventArgs that contains the event data.
Raises the DropDownClosing event.
protected virtual void OnDropDownClosing(RadPopupClosingEventArgs args)
An instance of the RadPopupClosingEventArgs class that contains information about the event.
Provides a hook for subclasses after the child popup has been created.
protected virtual void OnDropDownCreated()
Raises the DropDownOpened event.
Raises the DropDownOpening event.
protected virtual void OnDropDownOpening(CancelEventArgs args)
An EventArgs that contains the event data.
Opens this item's child popup on a supported mouse press, or closes it when the item is a root menu item.
Selects the item when the pointer enters it.
Clears the pressed state and deselects the item when its popup is closed and it is still selected.
Keeps an already-created child popup's right-to-left setting synchronized with this item.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Overrides:
Selects this item when charCode matches a mnemonic in its text, then delegates to the base implementation.
Serializes the default menu-item class name only when it has been changed.
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
The property being tested for serialization.
Returns:bool?
A serialization decision, or the base implementation's decision for other properties.
Overrides:
Calls the ShowPopup method and displays the child items in a popup window.
public virtual void ShowChildItems()
Events
Occurs after the menu item dropdown closes.
public event RadPopupClosedEventHandler DropDownClosed
Occurs before the popup is closed.
public event RadPopupClosingEventHandler DropDownClosing
Occurs before the popup is creating.
public event RadMenuItemDropDownCreatingEventHandler DropDownCreating
Occurs after the menu item dropdown opens.
public event EventHandler DropDownOpened
Occurs before the menu item dropdown opens.
public event CancelEventHandler DropDownOpening