Window.SystemBackdrop プロパティ

定義

この Windowに適用するシステムの背景を取得または設定します。 背景はコンテンツの背後に Window レンダリングされます。

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

void SystemBackdrop(SystemBackdrop value);
public SystemBackdrop SystemBackdrop { get; set; }
var systemBackdrop = window.systemBackdrop;
window.systemBackdrop = systemBackdrop;
Public Property SystemBackdrop As SystemBackdrop

プロパティ値

この Windowに適用するシステムの背景。

この例では、Mica Alt を使用するように をSystemBackdrop設定する方法を示します。

<Window
    ...>
    <Window.SystemBackdrop>
        <MicaBackdrop Kind="BaseAlt"/>
    </Window.SystemBackdrop>

    <Grid RowDefinitions="*,*">
        <!-- This area has a transparent background, so the Mica
         backdrop will be mostly visible. For example, if there are
         buttons here, the backdrop will show up in the margins
         and gaps between the buttons. -->
        <Grid Background="Transparent"></Grid>

        <!-- This area has an opaque background,
         so the Mica backdrop won't be visible. -->
        <Grid Grid.Row="1" Background="Gray"></Grid>
    </Grid>
</Window>
public MainWindow()
{
    this.InitializeComponent();

    SystemBackdrop = new MicaBackdrop() 
                        { Kind = MicaKind.BaseAlt };
}

注釈

システムの背景の詳細については、「Windows 11の資料」を参照してください。

背景は 、Window.Content で指定されたコンテンツの背後にレンダリングされます。 すべてのコンテンツが完全に不透明な場合、この背景には目に見える効果はありません。

適用対象

こちらもご覧ください