HeaderedContentControl
The HeaderedContentControl provides an easy way to display a header above arbitrary content. This control is much more flexible than HeaderedItemsControl since there's no requirement for the nature of the content. The following XAML creates the same list of colors as the HeaderedItemsControl example, using a StackPanel to display the colors vertically:
<c:HeaderedContentControl>
<c:HeaderedContentControl.Header>
<TextBlock FontSize="22" Text="Colors"
TextDecorations="Underline"/> </c:HeaderedContentControl.Header>
<c:HeaderedContentControl.Content>
<StackPanel Orientation="Vertical"> <TextBlock Text="Red"/> <TextBlock Text="Green"/> <TextBlock Text="Blue"/> <TextBlock Text="Cyan"/> </StackPanel> </c:HeaderedContentControl.Content> </c:HeaderedContentControl>
Table 3-29 defines the key properties of the HeaderedContentControl class.
|
Property |
Type |
Description |
|
Header |
object |
Specifies what is used as content for the header. |
|
HeaderTemplate |
DataTemplate |
Specifies the date template used to dynamically supply data for the header. See Chapter 5 for details. |
Average user rating: 5 stars out of 2 votes
Post a comment