How to Dynamically apply themes to RIA Services RRS feed

  • Question

  • Hi,

    We need to apply dynamically themes to RIA Services Silverlight Application.

    Is any one knows how to apply RIA Services Themes Dynamically?



    Thursday, August 20, 2009 7:40 AM


All replies

  • The Silverlight Toolkit Theming Overview might be a good place to start (http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20Overview%20Part%203).


    Thursday, August 20, 2009 11:25 AM
  • The Silverlight Toolkit Theming Overview might be a good place to start (http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20Overview%20Part%203).


      Hi Kyle,

    I checked above link which is stating for each and every control we can change Theme but I need to change a Theme which will apply to whole application and I tried above method to apply theme but doesn't working for Setting Theme in Resource Directory in App.xaml at runtime.

    Like in App.xaml we are assigning Styles.xaml which is applicable to whole application same thing I need to do at runtime do you having any code snipped  for this.





    Monday, August 24, 2009 9:45 AM
  • Have you tried this:

    Theme theme = new ExpressionDarkTheme(); // or another....
    theme.Content = new Shell();
    Application.Current.RootVisual = theme;

    Monday, August 24, 2009 10:50 AM
  •  Hello,

             See the link - http://gallery.expression.microsoft.com/en-us/seeingsoundria

              It may help u


    Mark as Answer if it helpful u.........



    Tuesday, August 25, 2009 8:16 AM
  •  Hello,

             see this link too - http://www.nikhilk.net/Silverlight-Themes.aspx


         Mark as answer if it helpful to u...........



    Tuesday, August 25, 2009 8:22 AM
  •  Thanks Pratixa,

    I am using Silverlight Business Application Template in to that we are having common theme which is shared across application

    and it's resides in to App.xaml file



                    <ResourceDictionary x:Name="ResourceStyle" Source="Assets/Styles.xaml"/>

     now when I starts my application it load styles from Styles.xaml now on the fly I need to change this one means need to change style path and it suppose to be reflected through out to the application.






    Tuesday, August 25, 2009 8:39 AM
  • If you are using the ImplicitStyleManager then why not just specify a new Uri to the style.xaml you want and apply it to your root visual element?

    Tuesday, August 25, 2009 6:52 PM