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

Get Windows Presentation Foundation 4.5 Cookbook 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.