MenuFlyoutSubItem
MenuFlyoutSubItem
MenuFlyoutSubItem
MenuFlyoutSubItem
Class
Definition
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// This API is not available in Javascript.
<MenuFlyoutSubItem>
oneOrMoreItems
</MenuFlyoutSubItem>
- Inheritance
-
MenuFlyoutSubItemMenuFlyoutSubItemMenuFlyoutSubItemMenuFlyoutSubItem
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited properties
Inherited events
Inherited methods
Remarks
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<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 key | Description |
|---|---|
| MenuFlyoutSubItemBackground | Background color of entire control bounds at rest |
| MenuFlyoutSubItemBackgroundPointerOver | Background color on hover |
| MenuFlyoutSubItemBackgroundPressed | Background color when pressed |
| MenuFlyoutSubItemBackgroundDisabled | Background color when disabled |
| MenuFlyoutSubItemForeground | Text color at rest |
| MenuFlyoutSubItemForegroundPointerOver | Text color on hover |
| MenuFlyoutSubItemForegroundPressed | Text color when pressed |
| MenuFlyoutSubItemForegroundDisabled | Text color when disabled |
| MenuFlyoutSubItemChevron | Chevron color at rest |
| MenuFlyoutSubItemChevronPointerOver | Chevron color on hover |
| MenuFlyoutSubItemChevronPressed | Chevron color when pressed |
| MenuFlyoutSubItemChevronDisabled | Chevron color when disabled |
| MenuFlyoutSubItemChevronSubMenuOpened | Chevron color when opened |
Constructors
MenuFlyoutSubItem() MenuFlyoutSubItem() MenuFlyoutSubItem() MenuFlyoutSubItem()
Initializes a new instance of the MenuFlyoutSubItem class.
public : MenuFlyoutSubItem()public MenuFlyoutSubItem()Public Sub New()// This API is not available in Javascript.
Properties
Icon 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// This API is not available in Javascript.
<MenuFlyoutSubItem Icon="symbolName" .../>
The graphic content of the menu flyout subitem.
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
IconProperty 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// This API is not available in Javascript.
The identifier for the Icon dependency property
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Items Items Items Items
Gets the collection used to generate the content of the sub-menu.
public : IVector<MenuFlyoutItemBase> Items { get; }public IList<MenuFlyoutItemBase> Items { get; }Public ReadOnly Property Items As IList<MenuFlyoutItemBase>// This API is not available in Javascript.
<MenuFlyoutSubItem>
oneOrMoreItems
</MenuFlyoutSubItem>
- Value
- IVector<MenuFlyoutItemBase> IList<MenuFlyoutItemBase> IList<MenuFlyoutItemBase> IList<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 Text
Gets or sets the text content of a MenuFlyoutSubItem.
public : PlatForm::String Text { get; set; }public string Text { get; set; }Public ReadWrite Property Text As string// This API is not available in Javascript.
<MenuFlyoutSubItem Text="string"/>
- Value
- PlatForm::String string string string
A string that specifies the text content of this MenuFlyoutSubItem. The default is an empty string.
TextProperty 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// This API is not available in Javascript.
The identifier for the Text dependency property.