Created
December 1, 2015 23:00
-
-
Save jammerxd/b6c2f3075d059d3e5a4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region ChangeTheme | |
public void ChangeTheme(string theme) | |
{ | |
App.Current.Dispatcher.Invoke(() => { | |
var tempTheme = ThemeManager.DetectAppStyle(Application.Current); | |
var appTheme = ThemeManager.GetAppTheme(theme); | |
ThemeManager.ChangeAppStyle(Application.Current, tempTheme.Item2, appTheme); | |
}); | |
} | |
#endregion | |
#region ChangeAccent | |
public void ChangeAccent(string accent) | |
{ | |
App.Current.Dispatcher.Invoke(() => { | |
var tempTheme = ThemeManager.DetectAppStyle(Application.Current); | |
var tempAccent = ThemeManager.GetAccent(accent); | |
ThemeManager.ChangeAppStyle(Application.Current, tempAccent, tempTheme.Item1); | |
}); | |
} | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment