MenuItem Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This control will be removed in a future major release. Please use the MenuBar control from the WinUI Library instead.
Menu Item is the items main container for Class Menu control
[System.Obsolete("This control will be removed in a future major release. Please use the MenuBar control from the WinUI Library instead.")]
public class MenuItem : Microsoft.Toolkit.Uwp.UI.Controls.HeaderedItemsControl
[System.Obsolete("This control will be removed in a future major release. Please use the MenuBar control from the WinUI Library instead.")]
public class MenuItem : Windows.UI.Xaml.Controls.ItemsControl
[<System.Obsolete("This control will be removed in a future major release. Please use the MenuBar control from the WinUI Library instead.")>]
type MenuItem = class
inherit HeaderedItemsControl
[<System.Obsolete("This control will be removed in a future major release. Please use the MenuBar control from the WinUI Library instead.")>]
type MenuItem = class
inherit ItemsControl
Public Class MenuItem
Inherits HeaderedItemsControl
Public Class MenuItem
Inherits ItemsControl
- Inheritance
- Inheritance
-
Windows.UI.Xaml.Controls.ItemsControlMenuItem
- Attributes
Constructors
MenuItem() |
Initializes a new instance of the MenuItem class. |
Fields
HeaderProperty |
Identifies the Header dependency property. |
HeaderTemplateProperty |
Identifies the HeaderTemplate dependency property. |
Properties
Header |
Gets or sets the header of each control. |
Header |
Gets or sets the data used for the header of each control. (Inherited from HeaderedItemsControl) |
HeaderTemplate |
Gets or sets the template used to display the content of the control's header. |
HeaderTemplate |
Gets or sets the template used to display the content of the control's header. (Inherited from HeaderedItemsControl) |
IsOpened |
Gets a value indicating whether the menu is opened or not |
Orientation |
Gets or sets the Orientation used for the header. (Inherited from HeaderedItemsControl) |
Methods
HideMenu() |
This method is used to hide the menu for current item |
OnApplyTemplate() | Windows.UI.Xaml.Controls.ItemsControl.OnApplyTemplate |
OnGotFocus(RoutedEventArgs) | Windows.UI.Xaml.Controls.ItemsControl.OnGotFocus(Windows.UI.Xaml.RoutedEventArgs) |
OnHeaderChanged(Object, Object) |
Called when the Header property changes. |
OnTapped(TappedRoutedEventArgs) | Windows.UI.Xaml.Controls.ItemsControl.OnTapped(Windows.UI.Xaml.Input.TappedRoutedEventArgs) |
ShowMenu() |
This method is used to show the menu for current item |