O'Reilly logo

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

Decorators

You've now seen several containers that are designed to help you manage other bits of content, including the ScrollViewer, GroupBox, and Expander. That makes this a good point to pause and consider another branch of container-like elements that aren't content controls. These are decorators, and they're typically used to add some sort of graphical embellishment around an object.

All decorators derive from System.Windows.Controls.Decorator. Most decorators are designed for use with specific controls. For example, the Button uses a ButtonChrome decorator to get its trademark rounded corner and shaded background, while the ListBox uses the ListBoxChrome decorator. Changing the appearance of these controls involves replacing their decorator ...

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