Share via


Flyout.FlyoutPresenterStyle Property

Definition

Gets or sets the Style applied to the Flyout content.

public:
 property Style ^ FlyoutPresenterStyle { Style ^ get(); void set(Style ^ value); };
Style FlyoutPresenterStyle();

void FlyoutPresenterStyle(Style value);
public Style FlyoutPresenterStyle { get; set; }
var style = flyout.flyoutPresenterStyle;
flyout.flyoutPresenterStyle = style;
Public Property FlyoutPresenterStyle As Style
<Flyout FlyoutPresenterStyle={StaticResource styleResourceKey}/>
- or -
<Flyout>
  <Flyout.FlyoutPresenterStyle>
    <Style TargetType="FlyoutPresenter">
      oneOrMoreSetters
    </Style>
  </Flyout.FlyoutPresenterStyle>
</Flyout>

Property Value

The applied Style for the Flyout content, if present; otherwise, null. The default is null.

Remarks

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.

Applies to

See also