Window.SystemBackdrop プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
この 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 で指定されたコンテンツの背後にレンダリングされます。 すべてのコンテンツが完全に不透明な場合、この背景には表示効果はありません。