共用方式為


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 的系統基底。

範例

此範例示範如何將 設定 SystemBackdrop 為使用 Mica Alt

<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中指定的內容後方轉譯。 如果所有內容完全不透明,則此底圖不會有任何可見的效果。

適用於

另請參閱