Class
MenuBase

Represents a control that defines choices for users to select.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

cs-api-definition
public abstract class MenuBase : ItemsControl

Inheritance: objectMenuBase

Derived Classes: RadContextMenuRadMenu

Constructors

MenuBase()

Initializes a new instance of the MenuBase class.

Declaration

cs-api-definition
protected MenuBase()

Fields

ClickToOpenProperty

Identifies the ClickToOpen dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ClickToOpenProperty

Field Value

DependencyProperty

HideDelayProperty

Identifies the HideDelay dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HideDelayProperty

Field Value

DependencyProperty

IconColumnWidthProperty

Identifies the IconColumnWidth dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IconColumnWidthProperty

Field Value

DependencyProperty

ItemContainerTemplateSelectorProperty

Identifies the ItemContainerTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemContainerTemplateSelectorProperty

Field Value

DependencyProperty

NotifyOnHeaderClickProperty

Identifies the NotifyOnHeaderClick dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NotifyOnHeaderClickProperty

Field Value

DependencyProperty

ShowDelayProperty

Identifies the ShowDelay dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShowDelayProperty

Field Value

DependencyProperty

Properties

ClickToOpen

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

Declaration

cs-api-definition
public bool ClickToOpen { get; set; }

Property Value

bool

HideDelay

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

Declaration

cs-api-definition
[TypeConverter(typeof(DurationConverter))]
public Duration HideDelay { get; set; }

Property Value

Duration

IconColumnWidth

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

Declaration

cs-api-definition
public double IconColumnWidth { get; set; }

Property Value

double

ItemContainerTemplateSelector

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

Declaration

cs-api-definition
public DataTemplateSelector ItemContainerTemplateSelector { get; set; }

Property Value

DataTemplateSelector

NotifyOnHeaderClick

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

Declaration

cs-api-definition
public bool NotifyOnHeaderClick { get; set; }

Property Value

bool

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

ShowDelay

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

Declaration

cs-api-definition
[TypeConverter(typeof(DurationConverter))]
public Duration ShowDelay { get; set; }

Property Value

Duration

Methods

ClearContainerForItemOverride(DependencyObject, object)

Clear the Menu property.

Declaration

cs-api-definition
protected override void ClearContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

Element used to display the specified item.

item

object

Specified item.

GetContainerForItemOverride()

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

Declaration

cs-api-definition
protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject

IsItemItsOwnContainerOverride(object)

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

Declaration

cs-api-definition
protected override sealed bool IsItemItsOwnContainerOverride(object item)

Parameters

item

object

The item to check.

Returns

bool

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

IsItemItsOwnContainerProtected(object)

Determines if the specified item is RadMenuItem.

Declaration

cs-api-definition
protected virtual bool IsItemItsOwnContainerProtected(object item)

Parameters

item

object

The item to check.

Returns

bool

True if the item is RadMenuItem; otherwise, false.

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

Responds to a change to the property.

Declaration

cs-api-definition
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)

Parameters

e

DependencyPropertyChangedEventArgs

The event data for the event.

OnItemClick(RadRoutedEventArgs)

Raises the ItemClick event.

Declaration

cs-api-definition
protected virtual void OnItemClick(RadRoutedEventArgs args)

Parameters

args

RadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

OnKeyDown(KeyEventArgs)

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

Declaration

cs-api-definition
protected override void OnKeyDown(KeyEventArgs e)

Parameters

e

KeyEventArgs

The event data for the event.

OnLoaded(RoutedEventArgs)

Called when a MenuBase is loaded.

Declaration

cs-api-definition
protected virtual void OnLoaded(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The RoutedEventArgs instance containing the event data.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

Declaration

cs-api-definition
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

Element used to display the specified item.

item

object

Specified item.

Events

ItemClick

Occurs when an item was clicked.

Declaration

cs-api-definition
public event RadRoutedEventHandler ItemClick

Event Value

RadRoutedEventHandler