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