我想在 uwp 中弹出时用黑色阴影模糊我的父网格。有没有办法在uwp中实现这个
I want to blur my parent grid with black shade at the time of popup in uwp. Is there any way to implement this in uwp
我正在 xaml 中使用 uwp 创建 dextop 应用程序。我想让父屏幕在弹出时模糊黑色。有什么办法吗
I want to blur my parent grid with black shade at the time of popup in uwp. Is there any way to implement this in uwp
您可以使用 Loading
控件来存档此功能。
<controls:Loading x:Name="LoadingControl" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center">
<controls:Loading.Background>
<SolidColorBrush Color="BurlyWood" Opacity="0.6" />
</controls:Loading.Background>
<ContentControl x:Name="LoadingContentControl" />
</controls:Loading>
如果您确实想让父屏变黑,请将Background
替换为AcrylicBrush
<Page.Resources>
<AcrylicBrush x:Key="CustomAcrylicBrush" BackgroundSource="Backdrop"
TintOpacity="0.2" TintColor="#FF000000" FallbackColor="#FF008000" />
</Page.Resources>
<controls:Loading x:Name="LoadingControl" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" Background="{StaticResource CustomAcrylicBrush}">
<TextBlock Text="Isloading" Foreground="Black"/>
</controls:Loading>
我正在 xaml 中使用 uwp 创建 dextop 应用程序。我想让父屏幕在弹出时模糊黑色。有什么办法吗
I want to blur my parent grid with black shade at the time of popup in uwp. Is there any way to implement this in uwp
您可以使用 Loading
控件来存档此功能。
<controls:Loading x:Name="LoadingControl" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center">
<controls:Loading.Background>
<SolidColorBrush Color="BurlyWood" Opacity="0.6" />
</controls:Loading.Background>
<ContentControl x:Name="LoadingContentControl" />
</controls:Loading>
如果您确实想让父屏变黑,请将Background
替换为AcrylicBrush
<Page.Resources>
<AcrylicBrush x:Key="CustomAcrylicBrush" BackgroundSource="Backdrop"
TintOpacity="0.2" TintColor="#FF000000" FallbackColor="#FF008000" />
</Page.Resources>
<controls:Loading x:Name="LoadingControl" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" Background="{StaticResource CustomAcrylicBrush}">
<TextBlock Text="Isloading" Foreground="Black"/>
</controls:Loading>