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.v20.1.dll


public bool ItemAutoWidth { get; set; }
Public Property ItemAutoWidth As Boolean

Property Value

Type Description

true if the gallery items' auto width feature is enabled; otherwise, false.


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.

See Also