Chapter 11. Styles, Templates, and Custom Controls

Silverlight applications would be a drab bunch if you were limited to the plain, gray look of ordinary buttons and other common controls. Fortunately, Silverlight has several features that allow you to inject some flair into basic elements, and standardize the look-and-feel of your application. In this chapter, you'll learn about the two most important: styles and templates.

Styles are an essential tool for organizing and reusing for formatting choices. Rather than fill your XAML with repetitive markup to set details like margins, padding, colors, and fonts, you can create a set of well-encapsulated styles. You can then apply the styles where you need them by setting a single property.

Templates ...

Get Pro Silverlight 2 in C# 2008 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.