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">
            <TextBlock Text="Grid 1"/>
        </Grid>

        <!-- This area has an opaque background,
        so the Mica backdrop won't be visible. -->
        <Grid Grid.Row="1" Background="Gray">
            <TextBlock Text="Grid 2"/>
        </Grid>


</Window>
public MainWindow()
{
    this.InitializeComponent();

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

注釈

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

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

適用対象

こちらもご覧ください