The MetroHeader is a UI control that allows content to be displayed with a specified header (like the HeaderedContentControl). The Header property can be any object and you can use the HeaderTemplate to specify a custom look to the header. Content for the MetroHeader will streched horizontally and vertically.

Setting the BorderBrush and BorderThickness properties will not have any effect on the MetroHeader. This is to maintain the same functionality as the ContentControl.


<Page ...
     xmlns:mah="" />

    <!-- Header content or HeaderTemplate content -->


Property Type Description
Header object Gets or sets the data used for the header of each control.
HeaderTemplate DataTemplate Gets or sets the template used to display the content of the control's header.
Orientation Orientation Gets or sets the Orientation to use for layout of the header. If set to Vertical the Header will be above the content. If set to Horizontal the Header will be to the left of the content..


The Header property can be set to a string or any other Xaml elements.

Sample Code

<mah:MetroHeader Header="This is the header!" />

        <Border Background="Gray">
            <TextBlock Text="This is the header!" FontSize="16" />

<mah:MetroHeader mah:HeaderedControlHelper.HeaderFontWeight="Bold"
                 mah:HeaderedControlHelper.HeaderForeground="{DynamicResource MahApps.Brushes.Accent}"
                 Header="TextBox sample">
    <TextBox Text="Proident ut reprehenderit excepteur esse non." />

For binding the Header to an object that is not a string, use the HeaderTemplate to control how the content is rendered. The default value for the HeaderTemplate will display the string representation of the Header.

Sample Code

<mah:MetroHeader Header="{Binding CustomObject}">
            <TextBlock Text="{Binding Title}" />