Gallery.ItemAutoWidth Property
Gets or sets whether gallery item widths are automatically modified so that the total gallery items’ width matches the Gallery’s width.
Namespace: DevExpress.Xpf.Bars
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
Boolean | true if the gallery items’ auto width feature is enabled; otherwise, false. |
Remarks
If a gallery’s width is fixed, take note of the following.
When the gallery items’ auto width feature is enabled, the average gallery item width is calculated:
Average Item Width = Gallery Width/
Gallery.ColCount.
The actual item width will be the larger of two values: Average Item Width and Width value of the Gallery.ItemSize property. To correctly display gallery items, the Width attribute of the Gallery.ItemSize property’s value should be less than or equal to the Average Item Width. Otherwise, the gallery items will not be displayed in their entirety.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ItemAutoWidth 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.