Reveal, Acrylic, etc. always use the fallback color when using WinUI in a custom control hosted in a Win32 Desktop Application
See original GitHub issueDescribe the bug
Whenever a XamlCompositionBrushBase
is used from Microsoft.UI.Xaml.Media
after following the steps at Custom XAML Control, all of the brushes use their fallback color instead of the correct color. This does not happen when using XamlCompositionBrushBase
brushes from Windows.UI.Xaml.Media
Steps to reproduce the bug
- Follow the steps at Custom XAML Control
- Set the background of the custom control to an
AcrylicBrush
fromMicrosoft.UI.Xaml.Media
usingHostBackdrop
. - Build and run the program. Notice how the brush always uses the fallback color.
- Try again, but with
AcrylicBrush
fromWindows.UI.Xaml.Media
. But now, notice how the brush works and does not use fallback. - You can also test the above steps with a
RevealBorderBrush
, reveal brushes fromMicrosoft.UI.Xaml.Media
also always use the fallback color.
Expected behavior
The XamlCompositionBrushBase
should work just like the platform brush;it should not always use the fallback color.
Version Info WinUI Version: 2.4.0-prerelease.200422001 (using prerelease because my application is unpackaged) Windows 10 version 1909 OS Build 18363.778 Desktop Only
NuGet package version: Microsoft.UI.Xaml: 2.4.0-prerelease.200422001
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
AcrylicBrush.AlwaysUseFallback Property - UWP
Gets or sets a value that specifies whether the brush is forced to the solid fallback color. Equivalent WinUI 2 API for UWP:...
Read more >Using a SystemBackdropController with WinUI 3 XAML
This article describes how to apply Mica or Acrylic as the base layer of your Windows App SDK/WinUI 3 XAML app. To use...
Read more >How to implement acrylic windows effect in WinUI3 ...
When creating WinUI 3 (Windows App SDK 1.0) project with VS 2022, I am unable to implement the acrylic background effect on Windows....
Read more >XAML – Windows Developer Blog - RSSing.com
As with XAML, Edge supports rendering color fonts by default in websites and web apps, including the XAML WebView control. Simply use HTML...
Read more >🤔 Thoughts on future of MAUI for desktop software? ...
My enthusiasm for MAUI has waned a bit as it gets closer to release. I think on Windows Desktop it's going to be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have advocated for a FauxCrylic mode being added, but rather than be seen as a stop gap, it should be used as a performance mode, so the development time and effort can be better justified, and Tablet Mode on devices like the Surface Go will benefit from not being full of Fallback Solid Colours.
If it persists after Live Acrylic is restored for WinUI 3.X - then the work does not go to waste, as the performance mode can still be there, and still be useful.
Then a faux acrylic brush needs to be made to fill in for it in WinUI3.