Back to Devexpress

LegendBase.TextOffset Property

windowsforms-devexpress-dot-xtratreemap-dot-legendbase-2763955d.md

latest2.3 KB
Original Source

LegendBase.TextOffset Property

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

Declaration

csharp
[XtraSerializableProperty]
public int TextOffset { get; set; }
vb
<XtraSerializableProperty>
Public Property TextOffset As Integer

Property Value

TypeDescription
Int32

Specifies the gap between a legend item’s marker and description in pixels.

|

Remarks

The following image shows indents between legend items:

The following code configures indents between treemap legend items:

csharp
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;
vb
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

LegendBase Class

LegendBase Members

DevExpress.XtraTreeMap Namespace