-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Acrylic Blur does not work on Windows 11 #6465
Comments
I tried it on my project and gives the same result, setting Background to Transparent doesnt fix it as well |
|
|
Even though this issue is closed, I still have problems on Windows 11 and Acrylic Blur / Mica effects. Even the Avalonia Control Gallery demo doesn't seem to have working acrylic either. |
@Nickelony that's pretty weird, because I used Acrylic yesterday in control catalog just yesterday on win11. On master branch. |
Yep it is still has the issue on Windows 11 (22000.318). |
Still does not works for me. Windows 11 Pro, 22000.376. Avalonia 0.10.10. |
SetWindowCompositionAttribute shouldn't be used unless you want to release potentially broken application. It's undocumented API and has history of performance problems on older windows versions. There must be another fix. Even though acrylic works perfectly with current master in this repo, I haven't tested MusicStore. Might be problem with some combination of custom window decorations. |
I'm having the same issue. I tried cloning and building MusicStore in VS 2022 and the acrylic is still erroneously opaque. |
I was able to reproduce by setting
|
Yup, sorry, you are correct - I was running |
I've create a minimalistic app for testing AcrylicBlur. VS 2022, Avalonia 0.10.11. https://github.com/DeXP/Avalonia.AcrylicBlur.Sample |
Yes! Not quite sure why that's the case. My guess is that it is a win11 issue, since I'm unable to reproduce on win10. It is likely caused by DwmExtendFrameIntoClientArea with non-zero MARGINS.
The projects have different implicit rendering options in their program.cs-file. Netcore / net6.0 uses opengl + winui compositor; netframework uses opengl without winui compositor. Winui compositor is required for acrylic and mica. It is configured in You're probably experiencing issues due to the bug above. Try setting |
Thank you very much, @trympet . |
I got Mica to work with <Window
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:Avalonia.NETCoreMVVMApp1Fs.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="[ClassHere]"
Icon="/Assets/avalonia-logo.ico"
Title="[TitleHere]"
TransparencyLevelHint="Mica"
Background="{x:Null}"
ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="PreferSystemChrome">
<!-- ... -->
</Window> |
@gargakshit Does it works for you after publishing the application in Self-contained mode? |
Building with |
Could you try setting the RID to |
|
Using the command |
According to Microsoft's documentation, it appears as a solid fallback color when running on windows versions below 22000. I am not sure how this translates to Avalonia as I personally do not have a windows 8 or 10 machine to test. |
I think |
|
I suspect that some versions of windows require a compatibility manifest to work properly. @maxkatz6 IIRC you've had issues with manifest previously. Could you post instructions here? |
Well, you can try to add app.manifest file with supported win10 os there. Visual Studio can generate one. It helped me with layered styled windows, probably it can somehow help with winui composition. Although I don't remember having problems with it without app.manifest. |
The problem is still there, following the official documentation for the implementation still doesn't work on windows 11 23H2 |
AcrylicBlur that is |
Describe the bug
Win2d acrylic blur does not work on Windows 11 build 22000.160. This also breaks
TransparencyLevel.Blur
if WinUI compositor is enabled.DWM transparency and blur works fine.
To Reproduce
Steps to reproduce the behavior:
TransparencyLevelHint.AcrylicBlur
on the main window.null
.This can also be observed in the SampleApp.
Expected behavior
The acrylic layer should not be opaque.
Screenshots
![image](https://user-images.githubusercontent.com/23460729/130830733-da118dc2-373b-4e54-a3fa-44b480c6c38e.png)
Desktop (please complete the following information):
Additional context
Side note:
ICompositor3.CreateHostBackdropBrush()
is not broken in this build of windows.ICompositor2.CreateBackdropBrush()
might be though.The text was updated successfully, but these errors were encountered: