-api-id | -api-type |
---|---|
P:Windows.UI.Xaml.Controls.Flyout.FlyoutPresenterStyle |
winrt property |
Gets or sets the Style applied to the Flyout content.
<Flyout FlyoutPresenterStyle={StaticResource styleResourceKey}/>
- or -
<Flyout>
<Flyout.FlyoutPresenterStyle>
<Style TargetType="FlyoutPresenter">
oneOrMoreSetters
</Style>
</Flyout.FlyoutPresenterStyle>
</Flyout>
- styleResourceKey
- styleResourceKeyThe key that identifies the style being requested. The key refers to an existing resource in a ResourceDictionary.
- oneOrMoreSetters
- oneOrMoreSettersOne or more Setter elements with Property attributes that target the dependency properties of a FlyoutPresenter.
The Style element you use for a FlyoutPresenterStyle value must specify TargetType="FlyoutPresenter"
.
A Flyout itself isn't a control or even a UIElement, and thus doesn't have any properties to apply a Style to. Instead, you can style the properties of the internal FlyoutPresenter that is presenting the Content of a Flyout. The properties that can be styled are the dependency properties of the base ContentControl class or Control class, such as FontSize or Padding, or base element properties such as FrameworkElement.Margin that the FlyoutPresenter class inherits. You also can use the properties that are available on whichever element you're setting as Flyout.Content, and set values of those properties directly rather than styling the FlyoutPresenter.