views:

137

answers:

1

I have several Silverlight component which are going to be used inside the browser, is it possible to pass the styling from the page to the Silverlight components?

I'm aware of 'initParams' in Silverlight and how these could be used to do this, but what I wanted to know is there any support for CSS and what is the preferred way to do styling in Silverlight, I guess it will be based around resource files.

Cheers

Ollie

+2  A: 

There is no css support in Silverlight. In Xaml we have the Style element, which allows you to create styles and then apply them to controls. Here is a tutorial that explains the basics pretty well:
http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-4-using-style-elements-to-better-encapsulate-look-and-feel.aspx

Henrik Söderlund