Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background acrylic and In-app acrylic behaves the same in WinUI 3. #6618

Closed
2 tasks done
Realinspirer opened this issue Jan 18, 2022 · 3 comments
Closed
2 tasks done
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

Comments

@Realinspirer
Copy link

Realinspirer commented Jan 18, 2022

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 -

image
Background acrylic

image
In-app acrylic

I think the cause of this bug is that in WinUI 3, <AcrylicBrush> has no property called BackgroundSource. It takes values like Backdrop or HostBackdrop 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 -

  1. Start a Grid, and add a Rectangle inside it. Set the Fill property to a solid color and set the size to something like (200,200).
<Grid>
        <Rectangle Fill="Blue" Width="200" Height="200"></Rectangle>
</Grid>

image

  1. Inside the Grid and below the Rectangle, add another Grid. Set its Background property to {ThemeResource AcrylicInAppFillColorDefaultBrush}.
<Grid>
        <Rectangle Fill="Blue" Width="200" Height="200"></Rectangle>
        <Grid Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}"></Grid>
</Grid>

image
As you can see, in-app acrylic works just fine!

  1. Change the value of Background to {ThemeResource AcrylicBackgroundFillColorDefaultBrush} and check if anything changes.
    <Grid>
        <Rectangle Fill="Blue" Width="200" Height="200"></Rectangle>
        <Grid Background="{ThemeResource AcrylicBackgroundFillColorDefaultBrush}"></Grid>
    </Grid>

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

image
Background acrylic selects the application background as the source.

image
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

  • Win32
  • UWP

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

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jan 18, 2022
@kmgallahan
Copy link
Contributor

kmgallahan commented Jan 18, 2022

Background acrylic isn't currently supported. The mentioned property was removed in .8 release:

https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/stable-channel#version-080-stable

You can vote for it and other things here:

https://portal.productboard.com/winappsdk/1-windows-app-sdk/c/28-background-acrylic

@Realinspirer
Copy link
Author

Thank you! Well, I already knew it, just wanted to make things clear.

@gabbybilka gabbybilka added the product-winui3 WinUI 3 issues label Feb 8, 2022
@StephenLPeters StephenLPeters added area-Materials Reveal, Acrylic, lighting, etc. team-Rendering Issue for the Rendering team duplicate This issue or pull request already exists and removed needs-triage Issue needs to be triaged by the area owners labels Mar 3, 2022
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants