I’m writing a (planned) 4 parts series on everything I think it’s worth knowing about styles in Silverlight. The first part is ready and it covers the following topics:
- What are Styles?
Styles are basically list of property-value pairs. Defining a style consists declaring the TargetType property and the list of Setters.
- Defining Styles in XAML
Defining styles in XAML is the easiest and most common method. They can either be defined in the Resources section or inline.
- Styles defined in XAML can be referenced in code-behind.
- Altering visual templates of an object doesn’t always end at styling. More powerful way of customizing the look and feel of objects involves using Control Templates and Themes.
You can read the (much more detailed) full article on my Scott Logic blog. This part has meant to be an introduction, the next parts will dig into more advanced Style usage scenarios.