Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top