Styles

A style is a collection of property values that you can apply to an element in one step. In Silverlight, styles let you streamline your XAML markup by pulling repetitive formatting details out of your element tags.

The Silverlight style system plays a similar role to the Cascading Style Sheets (CSS) standard in HTML markup. Like CSS, Silverlight styles allow you to define a common set of formatting characteristics and apply them throughout your application to ensure consistency.

Defining a Style

Experienced Silverlight developers turn to styles when they expect to use a group of formatting characteristics more than once. For example, imagine that you need to standardize the font and foreground color that are used in all the buttons on ...

Get Pro Silverlight 5 in VB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.