views:

386

answers:

1

I have a Silverlight application that is built from a set of Silverlight class libraries. I would like to create a common Silverlight library that contains a set of resources used to define the styles used for all the Silverlight UI libraries. This would be simlar to the <Styles>'s defined in the node within App.xaml file.

Is this possible? And if so, how would I implement?

+1  A: 

While this is possible using WPF (via Dynamic Resources, see this video and fast forward to 12:00), I don't think this is possible yet in Silverlight. The closest thing you have to this is the themes in the Silverlight toolkit. There is a comment on that page by the team stating that you can't change themes (or resource styles) at runtime in Silverlight 2:

unruledboy, We do not support changing themes at run-time as this is not an ability supported by the Silverlight framework.

So I think themes is the closest thing available right now.

Bryant
Thanks for the hint, in a round-about way this will probably work however this seems to be a real shortcoming of the Silverlight frameworks...hmmmm....
Kevin