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
public static readonly RadProperty IsPopupShownProperty
public static readonly RadProperty PopupDirectionProperty
protected MouseButtons pressedButton
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; }
[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:
[Browsable(false)]
public bool IsMainMenuItem { get; set; }
[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:
public int MergeOrder { get; set; }
Gets the next child item in the parent item's Items collection.
[Browsable(false)]
public RadItem Next { get; }
Implements:
Gets or sets the item's owner.
[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 of this item's hierarchy.
public IHierarchicalItem RootItem { get; }
Implements:
Gets the shortcuts handler for managing keyboard shortcuts.
protected override IComponentTreeHandler ShortcutsHandler { get; }
Overrides:
Methods
protected virtual void AdjustDropDownAlignmentForOrientation()
protected virtual void AdjustDropDownAlignmentForPopupDirection()
protected virtual void AdjustDropDownAnimations()
Disposes managed resources, including the associated image if it's not shared with other items.
protected override void DisposeManagedResources()
Overrides:
protected virtual void EnsureDropDownCreated()
protected override RectangleF GetClientRectangle(SizeF finalSize)
Overrides:
Closes the RadMenuItemBase popup.
public virtual void HideChildItems()
Initializes the internal state fields for the button item, setting default values for shared image and capture behavior.
protected override void InitializeFields()
Overrides:
Called when the bubble phase of a routed event occurs.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
The element that originally raised the event.
argsRoutedEventArgsThe routed event arguments.
Overrides:
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.
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.
Handles the mouse down event by setting the button to pressed state and capturing mouse input when appropriate.
protected override void OnMouseDown(MouseEventArgs e)
The MouseEventArgs containing event data.
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:
Determines whether the specified property should be serialized, with special handling for the SvgImageXml property.
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
The PropertyDescriptor representing the property to check for serialization.
Returns:bool?
True if the property should be serialized, false if it should not be serialized, or null for default behavior.
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