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.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
[DefaultValue(GallerySizeMode.Default)]
[DXCategory("Layout")]
public GallerySizeMode AutoSize { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Gallery |
Default | A Gallery |
Available values:
Name | Description |
---|---|
Default | The same as the Gallery |
None | A dropdown gallery cannot be resized. |
Vertical | A dropdown gallery can only be resized vertically. |
Both | Allows a dropdown gallery to be resized horizontally and vertically. |
#Remarks
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:
Gallery Size Mode | Description |
---|---|
Vertical | The gallery’s width is changed (if possible) to fit the number of columns specified by the Base |
Both | The gallery’s width and height are resized (if possible) to fit the number of columns and rows (specified by the Column |
Default | The same as the None option. |
None | The gallery’s size remains as is. |
Note
By default, when gallery resizing is enabled, the maximum number of visible columns is not limited by the Base
You can limit the number of visible columns for a Gallery