Skip to main content
A newer version of this page is available. .

Bar.BarItemHorzIndent Property

Gets or sets a value specifying the size of the horizontal indent between a link’s border and its content, in pixels.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v19.1.dll

Declaration

[DefaultValue(-1)]
public virtual int BarItemHorzIndent { get; set; }

Property Value

Type Default Description
Int32 -1

An integer value specifying the number of pixels separating the content of bar items from their borders, horizontally. -1 if the indent is specified by the BarManagerProperties.BarItemHorzIndent property of the Bar and Docking Controllers (Customizing Default View and Behavior Settings).

Remarks

Use the BarItemHorzIndent property to change the distance between the bar’s links. This property defines the horizontal indent between the content and the borders of bar links.

If the BarItemHorzIndent property is set to -1, the default indent is used.

You can specify the default horizontal indent via the BarManagerProperties.BarItemHorzIndent property of a Bar and Docking Controllers (Customizing Default View and Behavior Settings). This setting will affect the bars owned by the BarManagers, which are bound to this BarAndDockController.

The Bar.BarItemVertIndent property allows you to set the vertical indent between the content and the borders of bar links. The image below illustrates the horizontal and vertical indents:

ItemSpacing - HorizontalScaled

When a bar is docked to the left or right edge of a container (form), the vertical and horizontal distance between links is calculated automatically according to the current paint scheme specified by the BarAndDockingController.PaintStyleName property.

To get the actual horizontal indent between the content and borders of a bar’s links, use the Bar.GetLinkHorzIndent function.

The image below displays a bar whose BarItemHorzIndent property is set to -1 and 10, respectively.

ItemSpacing - BarItemHorzIndent

See Also