Hello...
I would like to change the theme of an application at runtime.
In order to achieve this effect I use the ThemeManager "CurrentTheme" Property .
( Already shown in another Thread.)
How may I now access custom Themes or themes which are not predefined in ThemeManager.GetThemes. In example "Lipstick" or "Leaf" ...
I'm a WPF newbee ... Any help is highly welcome.
Thanks,
Daniel
Hello,
In order to set a theme runtime of the existing ones. You just need add the assembly of that theme to your project and use the appropriate style for the component you need. For example you can load the theme for DataPresenter in the constructor or in the loaded event: eInfragistics.Windows.Themes.Lipstick.DataPresenter presenter = new Infragistics.Windows.Themes.Lipstick.DataPresenter();
And simply set current theme in any action for example button click:ThemeManager.CurrentTheme = "Lipstick";
I hope this helps.
Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Hello Dimi,
thanks for the quick answer!
Dimi Gineva"] You just need add the assembly of that theme to your project and use the appropriate style for the component you need.
Adding the assembly to my existing project does not seem to work. I still can't use the theme or set the style for a Ribbon Control.
ThemeManager.SetTheme(Ribbon,"Lipstick") doesn't work.
Also the theme isn't part of ThemeManager.GetThemes() ... ThemeManager.CurrentTheme = "Lipstick" leads to "Theme has not been registered".
In the short demo I found in this forum after referencing the assemby everything works just fine ... I'm quite confused at the moment.