Skip to main content
A newer version of this page is available. .

TreeMapControl.GroupHeaderContentTemplate Property

Gets or sets the template used to display the group header’s content in a treemap.

Namespace: DevExpress.Xpf.TreeMap

Assembly: DevExpress.Xpf.TreeMap.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.TreeMap, DevExpress.Wpf.TreeMap

Declaration

[NonCategorized]
public DataTemplate GroupHeaderContentTemplate { get; set; }

Property Value

Type Description
DataTemplate

A DataTemplate object that specifies the template used to display the group header.

Remarks

The following example customizes appearance of treemap group headers:

Run Demo: Selection

<local:TreeMapDemoModule
    x:Class="TreeMapDemo.Selection"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
    xmlns:dxct="http://schemas.devexpress.com/winfx/2008/xaml/charts/themekeys"
    xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
    xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/core/themekeys"
    xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
    xmlns:dxtm="http://schemas.devexpress.com/winfx/2008/xaml/treemap"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:TreeMapDemo">

    <Grid>
        <dxtm:TreeMapControl x:Name="treeMap">
            <dxtm:TreeMapControl.TreeMapStyle>
                <dxtm:TreeMapStyle
                    GroupBackground="Transparent"
                    GroupFontSize="12" />
            </dxtm:TreeMapControl.TreeMapStyle>
            <dxtm:TreeMapControl.GroupHeaderContentTemplate>
                <DataTemplate>
                    <TextBlock
                        Text="{Binding Label}"
                        Foreground="{dxi:ThemeResource {dxct:ChartBrushesThemeKey ResourceKey=TitleForeground}}"
                        FontWeight="{Binding FontWeight}"
                        FontSize="{Binding FontSize}"
                        TextTrimming="WordEllipsis"
                        Margin="4" />
                </DataTemplate>
            </dxtm:TreeMapControl.GroupHeaderContentTemplate>
    </Grid>
</local:TreeMapDemoModule>
See Also