Skip to main content

SunburstCenterLabel.TextPattern Property

Gets or sets the pattern that formats the sunburst’s center label text.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v25.1.dll

NuGet Package: DevExpress.TreeMap

Declaration

[XtraSerializableProperty]
public string TextPattern { get; set; }

Property Value

Type Description
String

The format string that configures the sunburst’s center label text.

Remarks

The text pattern can contain plain text, special placeholders and format specifiers.

The following table lists the placeholders you can use in patterns:

Placeholder Description
{TV} Shows the sunburst top level items’ total value.

Example

This example customizes sunburst center label text and appearance.

Use the SunburstControl.CenterLabel property to access the following settings:

TextPattern
Specifies center label text. You can use {TV} to display the total value of top level items. Use specifiers to format the value.
DXTextFont
Allows you to configure font attributes.
ForegroundColor / BackgroundColor
Define foreground and background colors.
sunburstControl.CenterLabel.TextPattern = "Total: ${TV : F2}";
sunburstControl.CenterLabel.DXTextFont = new DXFont("Tahoma", 10);
sunburstControl.CenterLabel.ForegroundColor = Color.Blue;
sunburstControl.CenterLabel.BackgroundColor = Color.Beige;

WinForms Sunburst Control - Customize Center Label, DevExpress

See Also