6.4. Headered Content Controls

One of the classes that derive from ContentControl is HeaderedContentControl. Its role is simple—it represents a container that has both single-element content (as stored in the Content property) and a single-element header (as stored in the Header property). The addition of the header is what distinguishes the HeaderedContentControl from the content controls you've seen so far.

Three classes derive from HeaderedContentControl: GroupBox, TabItem, and Expander. You'll explore them in the following sections.

6.4.1. The GroupBox

The GroupBox is the simplest of the three controls that derives from HeaderedContentControl. It's displayed as a box with rounded corners and a title. Here's an example (shown in Figure 6-11 ...

Get Pro WPF in C# 2010: Windows Presentation Foundation in .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.