Labs-Windows
Labs-Windows copied to clipboard
[UX] Mica support for sample app
Background
Design guidelines advise to use Mica as a background material for modern Windows apps, therefore it would be great for the Labs Gallery to have this as well.
Problem
The UWP and WAS implementations are completely different.
UWP implementation: https://docs.microsoft.com/en-us/windows/apps/design/style/mica#how-to-use-mica
WAS implementation: See WinUI 3 Gallery as docs are still being updated (see https://github.com/MicrosoftDocs/winui-api/issues/121#issuecomment-1158076578)
Solution
A #if WINAPPSDK check to select the right API for UWP / WAS:
As discussed here: https://github.com/CommunityToolkit/Labs-Windows/pull/162#issuecomment-1158170294
@Arlodotexe @michael-hawker
What would you recommend on implementing this. A large #if WINAPPSSDK section in App.xaml.cs that handles the WinUI 3 part of this and one for UWP (which should only be a single line)? Would this work with our current setup / Uno?
If anything we can just use !HAS_UNO
I think, as I'm not sure if Uno will ignore the acrylic or issue warning.
Probable worth making the class partial
(if it's not already) and putting all these bits in a separate App.Mica.xaml.cs
file though.