Template Basics

In the previous chapter, you learned about styles, which allow you to change the appearance of an element. However, styles are limited to setting properties that are defined in the element class. For example, there are various visual details about a button that you can't change because they aren't exposed through properties. Examples include the shading in a button's background and the way it highlights itself when clicked.

But Silverlight has another, much more radical customization tool called control templates. Although you can use styles with any Silverlight element, control templates are limited to Silverlight controls—in other words, elements that inherit from the Control class in the System.Windows.Controls namespace. These ...

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.