Labs-Windows icon indicating copy to clipboard operation
Labs-Windows copied to clipboard

[UX] Mica support for sample app

Open niels9001 opened this issue 2 years ago • 2 comments

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

niels9001 avatar Jun 17 '22 14:06 niels9001

@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?

image

niels9001 avatar Jun 28 '22 12:06 niels9001

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.

michael-hawker avatar Jun 28 '22 14:06 michael-hawker