Skip to main content
A newer version of this page is available. .
All docs
V21.1

HierarchicalChartControlBase.Titles Property

Returns the collection of treemap or sunburst titles.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v21.1.UI.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.TreeMap

Declaration

public TitleCollection Titles { get; }

Property Value

Type Description
TitleCollection

A collection that stores titles.

Remarks

A title can display a description for a treemap or sunburst. You can add any number of Title objects to the 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

  • Create a Title object.

  • Specify the settings below to customize the title’s content, alignment, text color, and font:

  • Add the title to the treemap’s Titles collection.

  • Repeat the previous steps to add a new title.
using DevExpress.XtraTreeMap;
using System;
using System.Drawing;
using System.Windows.Forms;
//...
    private void Form1_Load(object sender, EventArgs e) {
        //...
        // Add and customize the first title.
        Title title = new Title();
        title.Text = "US Largest Companies";
        title.Dock = TitleDockStyle.Top;
        title.TextColor = Color.Black;
        title.Font = new Font("Tahoma", 16);
        treeMapControl1.Titles.Add(title);

        // Add and customize the second title.
        Title subtitle = new Title();
        subtitle.Text = "in 2011";
        subtitle.Dock = TitleDockStyle.Top;
        subtitle.TextColor = Color.DarkGray;
        subtitle.Font = new Font("Tahoma", 11);
        treeMapControl1.Titles.Add(subtitle);

    }
See Also