Background acrylic and In-app acrylic behaves the same in WinUI 3. #6618
Labels
area-Materials
Reveal, Acrylic, lighting, etc.
duplicate
This issue or pull request already exists
no-issue-activity
product-winui3
WinUI 3 issues
team-Rendering
Issue for the Rendering team
Describe the bug
In WinUI 3, Background acrylic and In-app acrylic applies the same brush, i.e. the latter one. This can also be seen in the WinUI 3 Controls Gallery. Here's the image from the app -
Background acrylic
In-app acrylic
I think the cause of this bug is that in WinUI 3,
<AcrylicBrush>
has no property calledBackgroundSource
. It takes values likeBackdrop
orHostBackdrop
to denote In-app or Background respectively.Mica also doesn't work in WinUI 3.
Steps to reproduce the bug
You can see this bug every time you try to set any brush from Background acrylic as the brush (
AcrylicBackgroundFillColorDefaultBrush
, for instance). Here's an example to reproduce this bug -Grid
, and add aRectangle
inside it. Set theFill
property to a solid color and set the size to something like (200,200).Grid
and below theRectangle
, add anotherGrid
. Set itsBackground
property to{ThemeResource AcrylicInAppFillColorDefaultBrush}
.As you can see, in-app acrylic works just fine!
Background
to{ThemeResource AcrylicBackgroundFillColorDefaultBrush}
and check if anything changes.You can see that nothing changes even after setting the
Background
to a Background acrylic brush.Expected behavior
Expected behavior can be understood from these images from XAML Controls Gallery -
Background acrylic selects the application background as the source.
In-app acrylic selects whatever is behind the control as the source.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)
Windows app type
Device form factor
Desktop
Windows version
Insider Build (xxxxx), May 2021 Update (19043), October 2020 Update (19042), May 2020 Update (19041), November 2019 Update (18363), May 2019 Update (18362), October 2018 Update (17763)
Additional context
Workaround for this bug
I think you already know what I am about to mention, but you can place the current background image of the user's PC behind a
Grid
, and apply the Background acrylic as the brush (if this gets patched, then the brush will work as expected, without making changes). But this is not the absolute solution, it will not work as expected (image resizes with window and many problems).The text was updated successfully, but these errors were encountered: