Skip to main content
All docs
V25.1
  • Title Class

    A treemap/sunburst title.

    Namespace: DevExpress.Xpf.TreeMap

    Assembly: DevExpress.Xpf.TreeMap.v25.1.dll

    NuGet Package: DevExpress.Wpf.TreeMap

    Declaration

    public class Title :
        HierarchicalLayoutElement,
        ISupportFontSettings

    Remarks

    A title can display a description for a treemap or sunburst. You can add any number of Title objects to the treemap/sunburst chart’s Titles collection to add multiple titles.

    A sunburst with a title

    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