question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update acrylic theme resources

See original GitHub issue

Proposal: Update acrylic theme resources

Summary

Update some existing AcrylicBrush theme resources, add a few more, and update controls to reference correct resources.

Proposed changes

  1. Update SystemControlTransientBackgroundBrush To take advantage of the (not so new) TintLuminosityOpacity property, update the existing SystemControlTransientBackgroundBrush to use new values.

| TintColor | TintOpacity | TintLuminosityOpacity | FallbackColor | BackgroundSource – | – | – | – | – | – Light theme | #FCFCFC | 0.0 | 0.85 | #FCFCFC | HostBackdrop Dark theme | #2C2C2C | 0.15 | 0.96 | #2C2C2C | HostBackdrop

  1. Add new theme resources 2.1 Create SystemControlTransientAcrylicElementBrush using the following properties (all values are the same as above with the exception of BackgroundSource).

| TintColor | TintOpacity | TintLuminosityOpacity | FallbackColor | BackgroundSource – | – | – | – | – | – Light theme | #FCFCFC | 0.0 | 0.85 | #FCFCFC | Backdrop Dark theme | #2C2C2C | 0.15 | 0.96 | #2C2C2C | Backdrop

2.1.1 Update NavigationViewDefaultPaneBackground, DefaultCommandBarFlyoutCommandBarStyle.Background, NavigationViewTopPaneBackground to all use the new SystemControlTransientAcrylicElementBrush instead of their current acrylic resources.

2.2 Create SystemControlTransientBackgroundInverseBrush using the following properties (same as above but reversed per theme).

| TintColor | TintOpacity | TintLuminosityOpacity | FallbackColor | BackgroundSource – | – | – | – | – | – Light theme | #2C2C2C | 0.15 | 0.96 | #2C2C2C | HostBackdrop Dark theme | #FCFCFC | 0.0 | 0.85 | #FCFCFC | HostBackdrop

2.3 Create SystemControlBaseAcrylicBrush

| TintColor | TintOpacity | TintLuminosityOpacity | FallbackColor | BackgroundSource – | – | – | – | – | – Light theme | #F3F3F3 | 0.0 | 0.9 | #F3F3F3 | HostBackdrop Dark theme | #202020 | 0.0 | 0.96 | #202020 | HostBackdrop

2.4 Create a new SolidColorBrush named SystemControlDefaultBrighteningBrush

| Fill color | Opacity – | – | – Light theme | #FFFFFF | 0.5 Dark theme | #FFFFFF | 0.0419

Down-level behavior

The updated values described above rely on the TintLuminocityOpacity property, which was added in 19H1. Therefore, we will need to introduce a new AcrylicBrush_19h1_themeresources.xaml (or similar name) with new resources. We’ll also need to add new resources into the existing AcrylicBrush_rs2_themeresources.xaml and AcrylicBrush_rs1_themeresources.xaml files. For the RS2 dictionary, we’ll need to provide alternative values for these AcrylicBrush resources.

Proposed RS2 alternative values:

<!-- Light theme -->
        <muxm:AcrylicBrush x:Key="SystemControlTransientBackgroundBrush" TintColor="#FCFCFC" TintOpacity="0.8" FallbackColor="#FCFCFC" BackgroundSource="HostBackdrop"/>
        <muxm:AcrylicBrush x:Key="SystemControlBaseAcrylicBrush" TintColor="#F3F3F3" TintOpacity="0.8" FallbackColor="#F3F3F3" BackgroundSource="HostBackdrop"/>

<!-- Dark theme -->
        <muxm:AcrylicBrush x:Key="SystemControlTransientBackgroundBrush" TintColor="#1C1C1C" TintOpacity="0.8" FallbackColor="#2C2C2C" BackgroundSource="HostBackdrop" />
        <muxm:AcrylicBrush x:Key="SystemControlBaseAcrylicBrush" TintColor="#1C1C1C" TintOpacity="0.8" FallbackColor="#202020" BackgroundSource="HostBackdrop" />

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:22 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
chingucodingcommented, Oct 27, 2020

Updated the description with what I believe to be reasonable RS2 alternatives. They don’t look as great as the new values but remain usable.

Awesome! Since there don’t seem to be any open questions on this proposal, I’ll start working on this.

0reactions
msftbot[bot]commented, Jun 24, 2021

🎉This issue was addressed in #3498, which has now been successfully released as Microsoft.UI.Xaml v2.6.0.🎉

Handy links:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Acrylic material - Windows apps
We've created a collection of brush theme resources for both background and in-app acrylic types that respect the app's theme and fall back...
Read more >
c# - UWP setting themeresource acrylic in code behind
I have a UWP app and I want to upgrade it to fluent design system. I have created a new project using Windows...
Read more >
Using PlatformColor and Responding to Themes
The PlatformColor API gives you access to all of the system acrylic brushes which can be accessed by resource name. Simply provide the...
Read more >
Acrylic effect dont work on Windows 11 (with new ...
Acrylic effect dont work on Windows 11 (with new Windows11 theme). 1 Answer 265 Views. Window.
Read more >
i wish you could choose acrylic for everything in windows ...
Yes. You can even choose between dark and light regardless of your windows theme.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found