I've noticed this on the MahApps site (bottom of the page): "It is also possible to create an accent resource dictionary dynamically by using a specific color.", but I found more nowhere.
Is there really a built-in method (or anything else) for this?
I've only found ThemeManager.AddAccent(string name, Uri resourceAddress)
, and creating a new accent (currently) possible with new Accent(string name, Uri resourceAddress)
, so a name and a resource uri is everyhow needed...
Any ideas?
Here is a simple sample to create a dynamic resource dictionary and add it to the
ThemeManager
:Usage:
This is taken from my code samples (MahAppsMetroThemesSample) hosted at GitHub
Hope this helps!