New to Telerik UI for WPFStart a free 30-day trial

Represents a control that defines choices for users to select.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
public abstract class MenuBase : ItemsControl

Inheritance: objectMenuBase

Derived Classes: RadContextMenuRadMenu

Constructors

Initializes a new instance of the MenuBase class.

C#
protected MenuBase()

Fields

ClickToOpenProperty

DependencyProperty

Identifies the ClickToOpen dependency property.

C#
public static readonly DependencyProperty ClickToOpenProperty

HideDelayProperty

DependencyProperty

Identifies the HideDelay dependency property.

C#
public static readonly DependencyProperty HideDelayProperty

IconColumnWidthProperty

DependencyProperty

Identifies the IconColumnWidth dependency property.

C#
public static readonly DependencyProperty IconColumnWidthProperty

Identifies the ItemContainerTemplateSelector dependency property.

C#
public static readonly DependencyProperty ItemContainerTemplateSelectorProperty

NotifyOnHeaderClickProperty

DependencyProperty

Identifies the NotifyOnHeaderClick dependency property.

C#
public static readonly DependencyProperty NotifyOnHeaderClickProperty

ShowDelayProperty

DependencyProperty

Identifies the ShowDelay dependency property.

C#
public static readonly DependencyProperty ShowDelayProperty

Properties

Gets or sets whether the child group opens upon clicking a parent item.

C#
public bool ClickToOpen { get; set; }

HideDelay

Duration

Gets or sets the time, in milliseconds, before closing menu when the mouse cursor leave a submenu item.

C#
[TypeConverter(typeof(DurationConverter))]
public Duration HideDelay { get; set; }

Gets or sets the width of the column used to display the Icon.

C#
public double IconColumnWidth { get; set; }

ItemContainerTemplateSelector

DataTemplateSelector

Gets or sets the custom logic for choosing a template used to display each item.

C#
public DataTemplateSelector ItemContainerTemplateSelector { get; set; }

Gets or sets a value indicating whether the ItemClick is raised when the user clicks on a item that has children.

C#
public bool NotifyOnHeaderClick { get; set; }
Property Value:

True if the ItemClick event is raised when the user clicks on item that has children; otherwise, false.

ShowDelay

Duration

Gets or sets the time, in milliseconds, before displaying menu when the mouse cursor is over a submenu item.

C#
[TypeConverter(typeof(DurationConverter))]
public Duration ShowDelay { get; set; }

Methods

Clear the Menu property.

C#
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

Element used to display the specified item.

itemobject

Specified item.

Creates or identifies the element that is used to display the given item.

C#
protected override DependencyObject GetContainerForItemOverride()
Returns:

DependencyObject

Determines if the specified item is (or is eligible to be) its own container.

C#
protected override sealed bool IsItemItsOwnContainerOverride(object item)
Parameters:itemobject

The item to check.

Returns:

bool

True if the item is (or is eligible to be) its own container; otherwise, false.

Determines if the specified item is RadMenuItem.

C#
protected virtual bool IsItemItsOwnContainerProtected(object item)
Parameters:itemobject

The item to check.

Returns:

bool

True if the item is RadMenuItem; otherwise, false.

Responds to a change to the property.

C#
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameters:eDependencyPropertyChangedEventArgs

The event data for the event.

Raises the ItemClick event.

C#
protected virtual void OnItemClick(RadRoutedEventArgs args)
Parameters:argsRadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

Invoked when keyboard key is pressed while the element has focus.

C#
protected override void OnKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

The event data for the event.

Called when a MenuBase is loaded.

C#
protected virtual void OnLoaded(RoutedEventArgs e)
Parameters:eRoutedEventArgs

The RoutedEventArgs instance containing the event data.

Prepares the specified element to display the specified item.

C#
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

Element used to display the specified item.

itemobject

Specified item.

Events

Occurs when an item was clicked.

C#
public event RadRoutedEventHandler ItemClick