Back to Devexpress

SunburstLabel.TextPattern Property

windowsforms-devexpress-dot-xtratreemap-dot-sunburstlabel.md

latest3.8 KB
Original Source

SunburstLabel.TextPattern Property

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

Namespace : DevExpress.XtraTreeMap

Assembly : DevExpress.XtraTreeMap.v25.2.dll

NuGet Package : DevExpress.TreeMap

Declaration

csharp
[DefaultValue("{L}")]
[XtraSerializableProperty]
public string TextPattern { get; set; }
vb
<DefaultValue("{L}")>
<XtraSerializableProperty>
Public Property TextPattern As String

Property Value

TypeDefaultDescription
String"{L}"

The format string that configures the Sunburst’s label text.

|

Remarks

The text pattern can contain plain text, special placeholders and format specifiers. For example, you can use the “Value: {V:F2}” format string to show a value with two signs after a comma in the item label.

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

PlaceholderDescription
{L}Shows the sunburst item label.
{V}Shows the sunburst item value.

Example

This example demonstrates how to format content and fine-tune the appearance of sunburst item labels.

Use the following API members to customize label text format, appearance and arrangement.

csharp
sunburstControl.Label.TextPattern = "{L}: ${V:F2}M";
sunburstControl.Label.DisplayMode = SunburstLabelDisplayMode.Horizontal;
sunburstControl.Label.AutoLayout = true;
sunburstControl.Label.Visible = true;
sunburstControl.ItemStyle.TextColor = Color.DarkSlateBlue;
sunburstControl.ItemStyle.TextGlowColor = Color.White;
vb
sunburstControl.Label.TextPattern = "{L}: ${V:F2}M"
sunburstControl.Label.DisplayMode = SunburstLabelDisplayMode.Horizontal
sunburstControl.Label.AutoLayout = true
sunburstControl.Label.Visible = true
sunburstControl.ItemStyle.TextColor = Color.DarkSlateBlue
sunburstControl.ItemStyle.TextGlowColor = Color.White

The example above uses the following API members:

MemberDescription
SunburstLabel.TextPatternGets or sets the pattern that formats the Sunburst’s label text.
SunburstLabel.DisplayModeSpecifies how to align a label within a sunburst item.
SunburstLabel.AutoLayoutIndicates whether the adaptive layout is enabled for sunburst item labels.
SunburstLabel.VisibleSpecifies the visibility of sunburst item labels.
SunburstControl.ItemStyleReturns the sunburst item appearance settings.
HierarchicalItemStyle.TextColorGets or sets a treemap / sunburst item text color.
SunburstItemStyle.TextGlowColorGets or sets the glow color of the sunburst item’s text.

See Also

SunburstLabel Class

SunburstLabel Members

DevExpress.XtraTreeMap Namespace