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
rmrop said: sorry for the confusion ... the sample I added wasn't the application in question. It was a demo from Alex Fidanov. I was wondering why it was working perfectly only with a reference to an assembly and WITHOUT
sorry for the confusion ... the sample I added wasn't the application in question. It was a demo from Alex Fidanov. I was wondering why it was working perfectly only with a reference to an assembly and
WITHOUT
The only reason that would work is because by default the project's properties have the Debug->Enable the Visual Studio hosting process option checked. When that is checked and you run the project in VS with the debugger attached, the vs hosting process loads every assembly that the process references at the start of the application. This won't happen when you run without the debugger (as would happen when you distribute your application) or if you disable this option. As I mentioned, the CLR will only load assemblies that you reference/use so you have to include some reference to a type in the assembly that you want the CLR to load.
Hello Daniel, I see now, yes referring only the dll in your project will throws an exception, because the type wasn’t loaded. You can use the Andrew’s suggestions to load a type or make a instance of the Lipstick.DataPresenter that actually will load the type. If you got the error after adding that lines and load it, then I am not sure what is going on. I have updated your sample with that line and was working fine. Did you check it? If you still get the error in the modified sample let me know. If you tried in your own sample please share it with me so I will look at it. I hope this helps.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Hello Dimi,
Infragistics.Windows.Themes.Lipstick.DataPresenter presenter = new Infragistics.Windows.Themes.Lipstick.DataPresenter();
You can try it and just add e.g. the reference to Lipstick.dll ...
As I wrote above my project doesn't work with
It throws throws the error I mentioned above. Sorry I'm taking so much time ...
Hello, I am confused in your sample you didn’t add the references to the Lipstick theme, also I didn’t see any loaded type of the theme. I have modified your sample with my last suggestions and was successfully applying the selected style with from the list. I have tested with all build in themes and everything was working fine, without any error. Please look at the modified sample.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Hello ... sorry for bothering you again ...
Dimi Gineva"] You got the error because you don’t useInfragistics.Windows.Themes.Lipstick.DataPresenter presenter = new Infragistics.Windows.Themes.Lipstick.DataPresenter();
thanks for your timeDaniel