We are having an important issue trying to use the ThemeManager. I have asked long ago how to set the Current Theme on the Ribbon and other controls here.
Everything was working fine until we updated to Infragistics 2015.1 (without the service packs).
When we set the theme in the ThemeManager like this:
ThemeManager.CurrentTheme = "Onyx";
Nothing happens! Are we doing something wrong?
Thanks!
PS: I added a post to my old question, but I don't know if anyone is following it up.
PS2: Is there a Code Format option? I don't see it. It would be useful to have one.
Hi Rob,
It seems to be working, however I've noticed like it doesn't seem to work for all the Theme.s For example the Luna ones, when I try to apply them, they all look like the standard Infragistics (bluish) one.
Is that ok? Or do I have something not configured properly?
Also, I would like to validate something with you. Our users want to override the styles, only for certain controls, but by providing only the Styles.
How could I make use of them? Would it be valid to do something like this (following from your answers to my other question):
string[] groupings = ThemeManager.GetGroupingsForTheme(ThemeManager.CurrentTheme); foreach (string group in groupings) ThemeManager.Register(ThemeManager.CurrentTheme, group, dictionary);
Basically they don't want to set the Theme, so I register their styles in the CurrentTheme. Would this work ok?
Is my understanding that Infragistics Themes, have Themes for all the controls, when I do this, what happens to the default infragistics styles? Are they overriden?
For example in the CurrentTheme there are styles for the DockManager and I am Registering a new style for it, will it work? Is this the correct way to go about this issue?
I missed that part in parenthesis, I should have realized. 15.1.1000 is the base version. As for the source of this error, I'm not sure. I checked our bug history and there were a couple for the ThemeManager where themes weren't being applied to controls but I think these were for the new ThemeManager, not the old one. Maybe there is some overlap in the code they use. Not sure.
Since the base version, we have had two service updates making the current version 15.1.2055. I tested the first update that exists (15.1.2008) and this issue stopped occurring. The themes applied like you would expect. I want to point out that the first update was released the same day that 15.1 was released so it's likely that our internal tests picked up on this issue and it was resolved internally without a bug being created for it (which is why I wouldn't be able to find it). It was probably discovered too late to make the base version (15.1.1000) so it was included in the update (15.1.2008).
Yes, that is the version of my DLLs, that is what I meant when I said I have "Infragistics 2015.1 (without the service packs)", sorry if it wasn't clear.
Any idea at the souce for this error?
Hi Dzyann,
Is your DLL version numbered 15.1.20151.1000? The only way I can reproduce what you are seeing is to switch to that exact version. Fortunately this means that this issue has already been resolved in later updates. Download the latest SR for 15.1 WPF and the issue should clear up.
Thanks for your answer, I had some issues and I couldn't answer before.
I have updated the solution you provided so you can see how it fails.
I have added:
ThemeManager.CurrentTheme = ThemeManager.ThemeNameIGTheme;
To the application startup, you will see it doesn't have any effect.
I also added some buttons to the ribbon to switch between themes on the fly, none of them work. The property gets set but nothing happens.
Now not even the code where you set the theme as Onyx seems to work.
Please let me know what do you think we are doing wrong.
Thank you!