How do I create a style library for use in Silverlight class libraries?
I have a Silverlight application that is built from a set of Silverlight class libraries. I would like to create a generic Silverlight library that contains a set of resources used to define the styles used for all Silverlight UI libraries. It would be similar to <Styles>'s
that defined in node in the App.xaml file.
Is it possible? And if so, how would it be implemented?
source to share
While this is possible using WPF (via Dynamic Resources, see this video and upgrade to a later version), I don't think it's possible in Silverlight. The closest thing you need is the themes in the Silverlight suite . This page commented on the comment that you cannot change themes (or resource styles) at runtime in Silverlight 2:
unruledboy, We do not support changing themes at runtime, as this is not a feature supported by Silverlight.
So, I think that themes are the closest one available right now.
source to share