O'Reilly logo

Pro Silverlight 5 in VB by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required