Building More Complex Templates

In the previous section, you learned how to build a basic template for a button. Using a few straightforward triggers, you were able to create a respectable button without being forced to reimplement any core button functionality (as you would have been forced to do in a Windows Forms application). Best of all, these custom buttons support all the normal button behavior—you can tab from one to the next, you can click them to fire an event, you can use access keys, and so on. Best of all, you can reuse your button template throughout your application and still replace it with a whole new design at a moment's notice.

So what more do you need to know before you can skin all the basic WPF controls? In order to get ...

Get Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition 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.