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

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

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