O'Reilly logo

Windows Presentation Foundation 4.5 Cookbook by Pavel Yosifovich

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

Customizing a default template of custom control

Custom controls provide default control templates so that they have some look if used as is. However, the real power of custom controls is the ability to change the template without harming any functionality. In this recipe, we'll change the template for our color picker control to get a different look with the same functionality without writing any code just a different control template.

Getting ready

Open the CH10.TestCustomControls project. We'll use that project to create the new template and compare it to the default one.

How to do it...

We'll create a different control template that utilizes just some of the capabilities of the color picker control and makes sure the control is tolerant of missing ...

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