-api-id | -api-type |
---|---|
P:Microsoft.UI.Xaml.Controls.MenuFlyout.MenuFlyoutPresenterStyle |
winrt property |
Gets or sets the style that is used when rendering the MenuFlyout.
<MenuFlyout MenuFlyoutPresenterStyle="resourceReferenceToStyle"/>
- or -
<MenuFlyout>
<MenuFlyout.FlyoutPresenterStyle>
<Style TargetType="FlyoutPresenter">
oneOrMoreSetters
</Style>
</MenuFlyout.FlyoutPresenterStyle>
</MenuFlyout>
- resourceReferenceToStyle
- resourceReferenceToStyleA {StaticResource} markup extension reference to an existing Style from a XAML resource dictionary.
- oneOrMoreSetters
- oneOrMoreSettersOne or more Setter elements with Property attributes that target the dependency properties of a FlyoutPresenter.
The TargetType value to use for the Style must be MenuFlyoutPresenter (not MenuFlyout).
You can't style a MenuFlyout directly. Instead, you apply a style to the MenuFlyoutPresenter that provides the visuals for the flyout. You can also style MenuFlyoutItem and ToggleMenuFlyoutItem (they are controls) and you can use implicit styles to do so. Or, you can set UI-related properties on the MenuFlyoutItem and ToggleMenuFlyoutItem items directly.