Skip to main content
All docs
V24.2

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

LegendBase.TextOffset Property

Gets or sets the distance between a legend item’s marker and description in pixels.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v24.2.dll

NuGet Package: DevExpress.TreeMap

#Declaration

[XtraSerializableProperty]
public int TextOffset { get; set; }

#Property Value

Type Description
Int32

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

#Remarks

The following image shows indents between legend items:

Treemap legend indents

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;
See Also