Im currently working on a UWP app that looks something like this with Acrylic on the left panel:
Now when I enable power saving mode on my laptop, the acrylic gets replaced with its fallback color:
Now I want an option in my app's settings screen to disable acrylic throughout the app, and have the fallback color be used always. Im not sure where to begin however. This seems promising but I'm not sure how I'd implement it without having to go through every single acrylic material in the app and add code to disable it.
Is there a top level setting that I could use to do this? Thanks.
You can use
CustomResource
to decide how to display your AcrylicBrush:Prepare
In the question description, you need a top-level setting to switch the Acrylic effect. Here you can use
LocalSettings
.Tool.cs
Ddefine
According to the documentation of CustomResource, you need to create a derived class.
Usage
App.xaml.cs
MainPage
It should be noted that switching at runtime will not affect the already rendered elements. After the modification, you can pop up a
MessageDialog
asking the user to restart the application to re-render.Thanks.