Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Best method for creating "themes" and switching between them?

$
0
0

Hey Guys,

I've been wanting to add a Light and Dark theme to my application. I'm looking to change the properties of multiple views on the press of a button.
My current implementation works, but if there's a more efficient way that'd obviously be the direction I want to go in.

I currently have two XAML files...
DarkTheme.XAML
LightTheme.XAML

Both of these are resource dictionaries with a code behind page.

On startup, I'm setting my Application.Current.Resources to a new LightTheme and on my button press to a new DarkTheme.

Everything works fine and I have found no issues yet, but the implementation just feels greasy.

I've read some articles but haven't found any good resources that demonstrate changing a suite of view's and their properties.

Thanks for the help


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>