HeaderedTextBlock

The HeaderedTextBlock control provides a header for read-only text. This control is useful for displaying read-only forms, content, or a collection of items depending on the type.

Note

The HeaderedTextBlock control will be removed in a future major release. Please use HeaderedContentControl instead.

Syntax

<controls:HeaderedTextBlock Header="HeaderedTextBlockControl" 
           Text="Windows Community Toolkit"  Orientation="Vertical"/>  

Sample Output

HeaderedTextBlock animation

Properties

Property Type Description
Header object Gets or sets the header
HeaderTemplate DataTemplate Gets or sets the header style
HideTextIfEmpty bool Gets or sets a value indicating whether the Text TextBlock is hidden if its value is empty
Orientation Orientation Gets or sets the orientation
Text string Gets or sets the text
TextStyle Style Gets or sets the text style

Sample Project

HeaderedTextBlock Sample Page Source. You can see this in action in the Windows Community Toolkit Sample App.

Default Template

HeaderedTextBlock XAML File is the XAML template used in the toolkit for the default styling.

Requirements

Device family Universal, 10.0.16299.0 or higher
Namespace Microsoft.Toolkit.Uwp.UI.Controls
NuGet package Microsoft.Toolkit.Uwp.UI.Controls

API