Information
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

Base class, but not an abstract class, for all controls that contain single content and have a header.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[LocalizabilityAttribute(LocalizationCategory.Text)] 
public class HeaderedContentControl : ContentControl
/** @attribute LocalizabilityAttribute(LocalizationCategory.Text) */ 
public class HeaderedContentControl extends ContentControl
LocalizabilityAttribute(LocalizationCategory.Text) 
public class HeaderedContentControl extends ContentControl
<HeaderedContentControl>
  Content
</HeaderedContentControl>

A HeaderedContentControl has a limited default style. An application developer can instantiate a headered content control but its appearance will be very simple. If you wish to enhance the appearance of the control you can create a new template. Headered content controls are useful for creating custom controls because they provide a model for single content controls with headers.

ContentModel: For more information on the content model for HeaderedContentControl, see HeaderedContentControl Content Model.

The following examples show how to create a style for a HeaderedContentControl and how to add templates for additional appearance enhancement.

<Style TargetType="HeaderedContentControl">
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
        <StackPanel>
          <Grid>
            <Rectangle Stroke="{TemplateBinding Background}"/>
            <ContentPresenter ContentSource="Header"/>
          </Grid>
          <Grid>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <ContentPresenter ContentSource="Content"/>
          </Grid>
        </StackPanel>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

<HeaderedContentControl Background="LightBlue"
                        Header="Header"
                        Content="This is the content"/>

System.Object
   System.Windows.Threading.DispatcherObject
     System.Windows.DependencyObject
       System.Windows.Media.Visual
         System.Windows.UIElement
           System.Windows.FrameworkElement
             System.Windows.Controls.Control
               System.Windows.Controls.ContentControl
                System.Windows.Controls.HeaderedContentControl
                   System.Windows.Controls.Expander
                   System.Windows.Controls.GroupBox
                   System.Windows.Controls.TabItem
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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

Show:
© 2014 Microsoft. All rights reserved.