Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HeaderedContentControl Class

Updated: February 2009

Provides the base implementation for all controls that contain single content and have a header.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public class HeaderedContentControl : ContentControl

Content Model: The Content property and Header property of a HeaderedContentControl can be set to any type of object. For more information on the content model for HeaderedContentControl, see Controls Content Model Overview.

A HeaderedContentControl has a limited default style. An application developer can create a HeaderedContentControl, but its appearance will be very simple. If you wish to enhance the appearance of the control, you can create a new ControlTemplate. A HeaderedContentControl is useful for creating custom controls because it provides a model for single content controls with headers.

Dependency properties for this control might be set by the control’s default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see Themes.

The following examples show how to create a ControlTemplate for a HeaderedContentControl.

<Style TargetType="HeaderedContentControl">
  <Setter Property="Template">
      <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
            <Rectangle Stroke="{TemplateBinding Background}"/>
            <ContentPresenter ContentSource="Header"/>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <ContentPresenter ContentSource="Content"/>
<HeaderedContentControl Background="LightBlue"
                        Content="This is the content"/>


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0




February 2009

Described how default styles change dependency properties.

Customer feedback.

July 2008

Added new members: HeaderStringFormat property, HeaderStringFormatProperty field, OnHeaderStringFormatChanged method.

SP1 feature change.

Community Additions

© 2018 Microsoft