Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Applay theme at inicializations for all objects!
posted

Hi!

How can i Applay a theme at App inicialization for all objects!?

Thanks

Joao

Parents
  • 760
    Verified Answer
    posted

    Hello,

    WPF supports both explicit and implicit styles (application wide styles), while Silverlight supports only explicit styles. This means that in Silverlight when you define a style as a resource, you have to give it an explicit key, and call that key wherever you want the style to be applied. For example, if you have defined a TextBlock style in App.Resources, you have to explicity set the Style property on all TextBlocks within the application like this:

    <TextBlock Text="Text1" Style="{StaticResource key1}"/>

    <TextBlock Text="Text2" Style="{StaticResource key1}"/>

    However, the Silverlight Toolkit has an ImplicitStyleManager that makes implicit styles possible in Silverlight. You can find more information about that here:

    http://silverlight.codeplex.com/wikipage?title=Silverlight%20Toolkit%20Overview%20Part%203&referringTitle=Home&ANCHOR#ImplicitStyleManager

    Regards,

      Doychin Dochev

Reply Children
No Data