Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Title.Content Property

Gets or sets the treemap/sunburst title content.

Namespace: DevExpress.Xpf.TreeMap

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

NuGet Package: DevExpress.Wpf.TreeMap

#Declaration

public object Content { get; set; }

#Property Value

Type Description
Object

An object that specifies the title content.

#Example

#How to: Add Multiple Titles to a TreeMap

This example adds two titles to a treemap and customizes title settings such as content, font, and alignment.

Treemap titles

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TreemapExample"
        xmlns:dxtm="http://schemas.devexpress.com/winfx/2008/xaml/treemap" 
        x:Class="TreemapExample.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
            <dxtm:TreeMapControl x:Name="treemap">
                <dxtm:TreeMapControl.Titles>
                    <dxtm:Title Content="US Largest Companies" FontSize="18" FontFamily="Tahoma" 
                                HorizontalPosition="Center" VerticalPosition="TopOutside">
                        <dxtm:Title.ContentTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="12,12,12,0">
                                    <TextBlock Text="{Binding}" Margin="4"/>
                                    <Image Source="Icon.png" Height="32" Width="32"/>
                                </StackPanel>
                            </DataTemplate>
                        </dxtm:Title.ContentTemplate>
                    </dxtm:Title>
                    <dxtm:Title Content="in 2011" Margin="0,0,0,10" 
                                HorizontalPosition="Center" VerticalPosition="TopOutside"/>
                </dxtm:TreeMapControl.Titles>
                <!-- Data binding settings are skipped. -->
            </dxtm:TreeMapControl>
    </Grid>
</Window>
See Also