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.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
BarItemAutoSizeMode | A BarItemAutoSizeMode value that specifies the item’s auto-size mode. |
Available values:
Name | Description |
---|---|
None | Doesn’t apply the auto-size feature for a bar item link. The item link’s width is specified by the BarStaticItem.ItemWidth property. |
Content | Resizes a BarStaticItem’s link, so its width matches that link’s contents width. |
Fill | 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. |
Remarks
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).
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AutoSizeMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.