Greetings,
I am currently working on a project that then is reused in other projects. We use the ThemeManager and set the CurrentTheme in the App.xml.cs to whatever theme we wish. Our controls then have the property theme set to Current theme. From what I have read this is the way to go to set Infragistics themes at application level.
One of the projects we are working with would like to create a Custom Theme and use it in the same way. But I don't know if it is possible and how to do it. Their themes are the same than the default ones but with some changes for specific controls. They a project resourvces with a folder Themes and then a folder for the IG, Metro and Office2010Blue modified themes. In there they have a bunch of xaml files for the different controls and Styles (Colors.xaml, Metro.xamDataTree.xaml, Styles.WPF.xaml, etc)
In this post John Doe posted a link on how to create Custom themes but it is broken. And have seen other posters related with themes, but do not seem to be what I need (like the utility to wash the themes).
I would like to know what are the steps we should take in order to make use of these themes with the ThemeManager.CurrentTheme property.
Thanks!
Hi Dzyann,
The theme property on each control needs to be set to "[current]". This tells the control to use the CurrentTheme provided by the ThemeManager.
<ig:XamDataGrid Theme="[current]" ... >
With regards to the grouping, each control that supports the Theme property falls under a group in the ThemeManager. For example, the XamDataGrid falls under the "DataPresenter" group and the XamNumericEditor would fall under the "Editors" group. I believe there are 3 groupings: Editors, DataPresenter and Primitives. The grouping you use in the Register method depends on what control you are registering the theme for.
Hi Rob,
I have been working trying to use the Register method but i believe is not working. First I have a doubt about what is the Groouping parameter. I don't know what I am supposed to put there.
I have a bunch of xamls files, I add them all at run time to a ResourceDictionary and register it with the ThemeManager, but it doesnt work. I have buttons to switch between styles whenever I select one of the built in Themes works fine, but I select one of mine and it just goes back to the default (which I believe is the IGTheme).
Any help you can give me would be greatly appreciated!
All a theme really is, is a collection of styles that define how the different parts of the controls look. Knowing this it's relatively simple to register your own themes with the ThemeManager for use with the CurrentTheme property. The ThemeManager has a Register method that you can use to create a theme tied to a resource dictionary. http://help.infragistics.com/Help/NetAdvantage/WPF/2013.1/CLR4.0/html/InfragisticsWPF4.v13.1~Infragistics.Windows.Themes.ThemeManager~Register%28String,String,ResourceDictionary%29.html
John Doe's link is broken because it references documentation from 2009 which is no longer available on the web. The updated link should be: http://help.infragistics.com/NetAdvantage/WPF/2013.1/CLR4.0/?page=WPF_Creating_a_ThemePack.html