MenuFlyoutSubItem MenuFlyoutSubItem MenuFlyoutSubItem Class


Represents a menu item that displays a sub-menu in a MenuFlyout control.

public sealed class MenuFlyoutSubItem : MenuFlyoutItemBase, IMenuFlyoutSubItem, IMenuFlyoutSubItem2public sealed class MenuFlyoutSubItem : MenuFlyoutItemBase, IMenuFlyoutSubItem, IMenuFlyoutSubItem2Public NotInheritable Class MenuFlyoutSubItem Inherits MenuFlyoutItemBase Implements IMenuFlyoutSubItem, IMenuFlyoutSubItem2
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited events

Inherited methods


Control style and template

You can modify the default Style and ControlTemplate to give the control a unique appearance. For information about modifying a control's style and template, see Styling controls. The default style, template, and resources that define the look of the control are included in the generic.xaml file. For design purposes, generic.xaml is available in the (Program Files)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP&lt;SDK version>\Generic folder from a Windows Software Development Kit (SDK) installation. Styles and resources from different versions of the SDK might have different values.

Starting in Windows 10, version 1607 (Windows Software Development Kit (SDK) version 10.0.14393.0), generic.xaml includes resources that you can use to modify the colors of a control in different visual states without modifying the control template. In apps that target this software development kit (SDK) or later, modifying these resources is preferred to setting properties such as Background and Foreground. For more info, see the Light-weight styling section of the Styling controls article.

This table shows the resources used by the MenuFlyoutSubItem control.

Resource keyDescription
MenuFlyoutSubItemBackgroundBackground color of entire control bounds at rest
MenuFlyoutSubItemBackgroundPointerOverBackground color on hover
MenuFlyoutSubItemBackgroundPressedBackground color when pressed
MenuFlyoutSubItemBackgroundDisabledBackground color when disabled
MenuFlyoutSubItemForegroundText color at rest
MenuFlyoutSubItemForegroundPointerOverText color on hover
MenuFlyoutSubItemForegroundPressedText color when pressed
MenuFlyoutSubItemForegroundDisabledText color when disabled
MenuFlyoutSubItemChevronChevron color at rest
MenuFlyoutSubItemChevronPointerOverChevron color on hover
MenuFlyoutSubItemChevronPressedChevron color when pressed
MenuFlyoutSubItemChevronDisabledChevron color when disabled
MenuFlyoutSubItemChevronSubMenuOpenedChevron color when opened


MenuFlyoutSubItem() MenuFlyoutSubItem() MenuFlyoutSubItem()

Initializes a new instance of the MenuFlyoutSubItem class.

public MenuFlyoutSubItem()public MenuFlyoutSubItem()Public Sub New()


Icon Icon Icon

Gets or sets the graphic content of the menu flyout subitem.

public IconElement Icon { get; set; }public IconElement Icon { get; set; }Public ReadWrite Property Icon As IconElement
<MenuFlyoutSubItem Icon="symbolName" .../>
IconElement IconElement IconElement

The graphic content of the menu flyout subitem.


IconProperty IconProperty IconProperty

Identifies the Icon dependency property.

public static DependencyProperty IconProperty { get; }public static DependencyProperty IconProperty { get; }Public Static ReadOnly Property IconProperty As DependencyProperty
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Icon dependency property


Items Items Items

Gets the collection used to generate the content of the sub-menu.

public IVector<MenuFlyoutItemBase> Items { get; }public IVector<MenuFlyoutItemBase> Items { get; }Public ReadOnly Property Items As IVector<MenuFlyoutItemBase>

The collection that is used to generate the content of the sub-menu, if it exists; otherwise, null. The default is an empty collection.


Text Text Text

Gets or sets the text content of a MenuFlyoutSubItem.

public string Text { get; set; }public string Text { get; set; }Public ReadWrite Property Text As string
<MenuFlyoutSubItem Text="string"/>
string string string

A string that specifies the text content of this MenuFlyoutSubItem. The default is an empty string.


TextProperty TextProperty TextProperty

Identifies the Text dependency property.

public static DependencyProperty TextProperty { get; }public static DependencyProperty TextProperty { get; }Public Static ReadOnly Property TextProperty As DependencyProperty
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Text dependency property.


See Also