Creating Templates for Custom Controls

As you've seen, every Silverlight control is designed to be lookless, which means you can completely redefine its visuals (the look). What doesn't change is the control's behavior, which is hardwired into the control class. When you choose to use a control like Button, you choose it because you want button-like behavior—an element that presents content and can be clicked to trigger an action.

In some cases, you want different behavior, which means you need to create a custom control. As with all controls, your custom control will be lookless. Although it will provide a default control template, it won't force you to use that template. Instead, it will allow the control consumer to replace the default template ...

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

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