Window.SystemBackdrop Proprietà

Definizione

Ottiene o imposta lo sfondo del sistema da applicare all'oggetto Window. Il rendering dello sfondo viene eseguito dietro il Window contenuto.

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

Valore della proprietà

Sfondo del sistema da applicare a questo Windowoggetto .

Esempio

In questo esempio viene illustrato come impostare l'oggetto per l'uso SystemBackdrop di 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 };
}

Commenti

Per altre informazioni sugli sfondi di sistema, vedere Materiali in Windows 11.

Il rendering dello sfondo viene eseguito dietro il contenuto specificato in Window.Content. Se tutto il contenuto è completamente opaco, questo sfondo non avrà alcun effetto visibile.

Si applica a

Vedi anche