简体   繁体   中英

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

I am creating a dextop application using uwp in xaml. i want to make the parent screen to blur black at time of popup. Is there any way to do so.

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

You could use Loading control to archive this feature.

<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>

If you do want to make the parent screen to blur black, please replace Background with 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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM