BarStaticItem.AutoSizeMode Property

Gets or sets the item’s auto-size mode. This is a dependency property.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v21.2.dll


public BarItemAutoSizeMode AutoSizeMode { get; set; }

Property Value

Type Description

A BarItemAutoSizeMode value that specifies the item’s auto-size mode.

Available values:

Name Description

Doesn’t apply the auto-size feature for a bar item link. The item link’s width is specified by the BarStaticItem.ItemWidth property.


Resizes a BarStaticItem’s link, so its width matches that link’s contents width.


Resizes a specific BarStaticItem’s link so that it consumes the largest possible area of a bar.

To allow the bar to be stretched to the bar container’s width, set the Bar.UseWholeRow property to true.


If the AutoSizeMode property is set to BarItemAutoSizeMode.Fill, the item’s link occupies the largest possible space within the bar. This setting makes sense when the bar is stretched to the bar container’s width (the Bar.UseWholeRow option is enabled).

See Also