Skip to main content

StandaloneGallery.AutoSize Property

Gets or sets a gallery’s auto-size mode, which determines the gallery’s initial size.

Namespace: DevExpress.XtraBars.Ribbon.Gallery

Assembly: DevExpress.XtraBars.v22.2.dll

NuGet Package: DevExpress.Win.Navigation


public GallerySizeMode AutoSize { get; set; }

Property Value

Type Default Description
GallerySizeMode Default

A GallerySizeMode value.

Available values:

Name Description

The same as the GallerySizeMode.None option.


A dropdown gallery cannot be resized.


A dropdown gallery can only be resized vertically.


Allows a dropdown gallery to be resized horizontally and vertically.


After enabling an auto-size mode (GallerySizeMode.Vertical or GallerySizeMode.Both), the gallery is immediately resized (if possible) to match the selected auto-size mode. This, however, doesn’t prevent the gallery from being resized afterwards.

The following table describes the available auto-size modes:

GallerySizeMode value



The gallery’s width is changed (if possible) to fit the number of columns specified by the BaseGallery.ColumnCount property. The number of rows is determined automatically, based on the column number. See the note below.


The same as the Vertical option, except the following: if the actual number of items is less than ColumnCount, the gallery’s width is reduced (if possible) to fit the actual number of columns.


The same as the None option.


The gallery’s size remains as is.


By default, when gallery resizing is enabled, the maximum number of visible columns is not limited by the BaseGallery.ColumnCount property.

You can limit the number of visible columns for a GalleryControl‘s gallery. This can be accomplished by setting the GalleryControlGallery.AutoFitColumns property to false.

See Also