Share via


Flyout.FlyoutPresenterStyle 屬性

定義

取得或設定套用至飛出窗口內容的 Style

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>

屬性值

如果存在,則為飛出視窗內容的套用樣式;否則為 null。 預設值為 null

備註

您用於 FlyoutPresenterStyle 值的 Style 元素必須指定 TargetType="FlyoutPresenter"

飛出視窗本身不是控件或甚至是UIElement,因此沒有任何屬性可套用 Style。 相反地,您可以設定呈現飛出視窗內容之內部 FlyoutPresenter 的屬性樣式。 可設定樣式的屬性是基底 ContentControl 類別或 Control 類別的相依性屬性,例如 FontSizePadding,或 FlyoutPresenter 類別繼承的 FrameworkElement.Margin 等基底元素屬性。 您也可以使用您要設定為 Flyout.Content 之專案上可用的屬性,並直接設定這些屬性的值,而不是設定 FlyoutPresenter 的樣式。

適用於

另請參閱