Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
560
How to access Custom - themes using ThemeManager?
posted

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

 

Parents
No Data
Reply
  • 12773
    posted

    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,
    Dimi
    Developer Support Engineer
    Infragistics, Inc.

     

Children