microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.2k stars 669 forks source link

Acrylic does not work properly. Start the APP before turning on the transparency effect #9764

Open JamasChuang94 opened 1 month ago

JamasChuang94 commented 1 month ago

Describe the bug

1.Start the app after turning off the transparency effect in Windows 11 settings. After launching the app and then turning on the transparency effect from Windows settings, Acrylic will not work properly.

2.My project implements SystemBackdrop using CreateSystemDispatcherQueueController SystemBackdropConfiguration DesktopAcrylicController

3.I found WinUI 3 Gallery of

<?xml version="1.0" encoding="utf-8"?>
<Window
    x:Class="YourProject.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:YourProject"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Window.SystemBackdrop>
        <DesktopAcrylicBackdrop />
    </Window.SystemBackdrop>

    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
        <Button x:Name="myButton" Click="myButton_Click">Click Me</Button>
    </StackPanel>
</Window>

Also according to the above steps, DesktopAcrylicBackdrop cannot work normally, but MIca and AcrylicInApp can work normally.

4.Version:

CppWinRT 2.0.240405.15

BuildTools 10.0.22621.3233

WindowsAppSDK 1.5.240428000

Steps to reproduce the bug

Start the app after turning off the transparency effect in Windows 11 settings. After launching the app and then turning on the transparency effect from Windows settings, Acrylic will not work properly.

Expected behavior

Even if you turn off the system transparency effect and then turn on the transparency effect after launching the program, it should remain on and then restore the acrylic effect

Screenshots

No response

NuGet package version

Windows App SDK 1.5.3: 1.5.240428000

Packaging type

Packaged (MSIX)

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2022

Additional context

No response

github-actions[bot] commented 4 weeks ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.