I am sure there must be some way to have multiple custom themes to be applied in one silverlight application.
Here is what I am trying to accomplish -
1. Have one custom theme set at application level and
2. Whereever required, set another theme for various controls depending on the requirement.
(Note: Custom themes are nothing but modified brushes of standard themes (Vista, OfficeBlack)
Currently I can set the custom theme to application and its working fine.
I have set the theme in App.xaml.cs as follows -
themename = "OfficeBlack"; | ||
mainthemepath = "/<assembly name>;component/Themes/" + themename + "/generic.xaml"; submainthemepath = "/<assembly name>;component/Themes/Internal/" + themename + "/generic.xaml"; | ||
Theme customTheme = new Theme (new Uri(mainthemepath, UriKind.Relative)); | ||
| ||
I tried to apply another custom theme to a control as follows -
StyleManager.SetTheme(<controlName>, App.NewTheme); |
But it seems its not getting applied. I am not sure whether this is suported and if yes how to set it.
Any help is highly appreciated.
Thanks in Advance