Changing Styles using ImplicitStyleManager

A bunch of new controls were released yesterday as part of silverlight toolkit. One of new Items is ImplicitStyleManager which simplifies changing styles. You can download the sample here. It doesnt do anything meaningful but shows how we can dynamically change styles in the application.

Here are some screenshots


11 thoughts on “Changing Styles using ImplicitStyleManager

  1. Hi Lee, I have gone thru ur application and the code behind for it. I am new to Silverlight toolkit and Themes. Could you kindly explain ur code step by step if possible.


      1. Hi Lee. Understood ur code well thoroughly. Was a little mentally tired yesterday, so probably the code could not register properly. Well I am working with “Microsoft.Cui.Controls”( Patient Banner control.

        Is there anyway I can apply the theme styling(from ur code sample) to the Patientbanner control. Have been on this issue for a week now.
        I tried using it as one of the child controls inside ur application, but the control did not reflect the required styles of the theme selected.

          1. Hi currently this is the “xaml file”



            By explicitly setting the theme you mean setting it in the XAML code is it or in the C# backend code. Can u plz reply back with a sample code for the same.

          2. you could replace the “this” with the control name

            ImplicitStyleManager.SetResourceDictionaryUri(this, new Uri(@”projname;component/Theme.xaml”, UriKind.Relative));
            ImplicitStyleManager.SetApplyMode(this, ImplicitStylesApplyMode.Auto);

  2. No Lee,

    Adding ‘this’ keyword instead of the control name gives the same result i.e. ‘Silverlight XAML Controls’ are coming out properly skinned/themed by the applied theme. Its just the PatientBanner control which is not complying to the Theme set by me.

    Can u try this out if possible and let me know. I really think that Silverlight toolkit which supports common Silverlight XAML controls does not support Microsoft.Cui.Controls. Lemme know ur thoughts on the same. Thanks for ur time 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s