Bahasa

Window.SystemBackdrop Properti

Definisi

Mendapatkan atau mengatur backdrop sistem untuk diterapkan ke ini Window. Latar belakang dirender di Window belakang konten.

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

Nilai Properti

Backdrop sistem untuk diterapkan ke ini Window.

Contoh

Contoh ini menunjukkan cara mengatur SystemBackdrop untuk menggunakan 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">
            <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 };
}

Keterangan

Untuk informasi selengkapnya tentang backdrops sistem, lihat Bahan di Windows 11.

Latar belakang dirender di belakang konten yang ditentukan dalam Window.Content. Jika semua konten sepenuhnya buram, latar belakang ini tidak akan memiliki efek yang terlihat.

Berlaku untuk

Lihat juga