Skip to main content

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

SunburstCenterLabel.ForegroundColor Property

Gets or sets the center label’s foreground color.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v24.2.dll

NuGet Package: DevExpress.TreeMap

#Declaration

[XtraSerializableProperty]
public Color ForegroundColor { get; set; }

#Property Value

Type Description
Color

A Color value that specifies the foreground color.

#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