Chapter 16. Themes and Skins

WPF lets you build applications that have engaging, distinctive appearances. By using relatively simple techniques such as drop shadows, partial transparency, and transparency masks, you can make an eye-catching interface that adds interest and excitement to even the most routine application.

Properties let you change the appearance of controls. They let you change visual characteristics such as a control's colors, size, location, and contents. Resources and styles let you package those changes so that you can easily apply them to many controls simultaneously.

Templates let you alter the way controls behave by changing the pieces that make up the controls. They let you change the appearance and behavior of Buttons, ListBoxes, Menus, and other controls in fundamental ways while still allowing them to perform their essential functions.

Themes and skins bring all of these ideas together to let you easily change the appearance and behavior of an entire application to suit the users' needs and moods.

Themes

Some developers use the terms theme and skin interchangeably, but I make the distinction that a skin applies to a single application (or part of an application), and a theme applies to more than one application.

More precisely, a theme is a unifying plan that helps determine the appearance and behavior of more than one application. The most common themes are those provided by Windows. For example, Windows 7 provides the themes:

  • Aero

  • Classic

  • Luna (Homestead, Metallic, ...

Get WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4 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.