Get the Mica transparency level from WinUI 3 #320
Unanswered
onionware-github
asked this question in
Q&A
Replies: 1 comment
-
FWIW I've opened an issue upstream about this: AvaloniaUI/Avalonia#10719 The Mica brush isn't properly created upstream, it just pulls the blurred wallpaper from the WinUI compositor and returns. Unfortunately, this likely won't be fixed anytime soon given restrictions upstream until 11.0 is released. In the meantime you can try to do what I do in the sample app: FluentAvalonia/samples/FluentAvaloniaSamples/Views/MainWindow.axaml.cs Lines 143 to 168 in 8636ee6 It doesn't look very good, but its something. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I want to add Mica to my FluentAvalonia app, but I dont get the right transparency for my page background to achieve the same colors that my WinUI 3 version of my app has:
![image](https://user-images.githubusercontent.com/91136545/226181006-5f427abe-7cde-4e0f-8445-bfb84557d452.png)
![image](https://user-images.githubusercontent.com/91136545/226181007-f43a5bdf-1d6e-4db1-bc11-a02785ed6036.png)
I use the WindowsUIComposition and Background="Transparent" in my MainWindow.
Here are screenshots from the Avalonia version:
Here are screenshots of the WinUI 3 version of my app:
![image](https://user-images.githubusercontent.com/91136545/226181042-1b58f83c-e696-4122-9b28-bd575adfe745.png)
![image](https://user-images.githubusercontent.com/91136545/226181043-93fa4d0d-cc5c-4e93-b150-bd7455e0a513.png)
You can see that the WInUI version only uses a little amount of Mica transparency, but the Avalonia version has too much Mica.
The Avalonia version should have the same style as the WinUI 3 version, does anybody know the correct values, that I have to use as my page background to achieve the same look?
Beta Was this translation helpful? Give feedback.
All reactions