windowsforms-devexpress-dot-xtratreemap-dot-legendbase-2763955d.md
Gets or sets the distance between a legend item’s marker and description in pixels.
Namespace : DevExpress.XtraTreeMap
Assembly : DevExpress.XtraTreeMap.v25.2.dll
NuGet Package : DevExpress.TreeMap
[XtraSerializableProperty]
public int TextOffset { get; set; }
<XtraSerializableProperty>
Public Property TextOffset As Integer
| Type | Description |
|---|---|
| Int32 |
Specifies the gap between a legend item’s marker and description in pixels.
|
The following image shows indents between legend items:
The following code configures indents between treemap legend items:
using DevExpress.XtraTreeMap;
//...
ColorListLegend legend = new ColorListLegend();
legend.Direction = LegendDirection.LeftToRight;
legend.HorizontalAlignment = LegendHorizontalAlignment.Center;
legend.VerticalAlignment = LegendVerticalAlignment.BottomOutside;
legend.HorizontalIndent = 40;
legend.VerticalIndent = 20;
legend.TextOffset = 20;
legend.EquallySpacedItems = true;
treeMapControl1.Legend = legend;
Imports DevExpress.XtraTreeMap
Dim legend As ColorListLegend = New ColorListLegend()
legend.Direction = LegendDirection.LeftToRight
legend.HorizontalAlignment = LegendHorizontalAlignment.Center
legend.VerticalAlignment = LegendVerticalAlignment.BottomOutside
legend.HorizontalIndent = 40
legend.VerticalIndent = 20
legend.TextOffset = 20
legend.EquallySpacedItems = True
treeMapControl1.Legend = legend
See Also