Skip to main content

GalleryControlGallery.ContentHorzAlignment Property

Gets or sets the horizontal alignment of gallery items relative to the right edge (for vertically oriented galleries). For horizontally oriented galleries, this property specifies the vertical alignment of gallery items relative to the top edge.

Namespace: DevExpress.XtraBars.Ribbon.Gallery

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(HorzAlignment.Default)]
[DXCategory("Layout")]
public HorzAlignment ContentHorzAlignment { get; set; }

Property Value

Type Default Description
HorzAlignment Default

A HorzAlignment value that specifies the horizontal or vertical alignment of gallery items.

Available values:

Name Description
Default

Places an object or text at the default position, which is determined by a control.

Near

Places an object/text at a near position.

Center

Centers an object or text within a region.

Far

Places an object/text at a far position.

Remarks

The gallery’s default orientation is vertical. In this case, the ContentHorzAlignment property specifies the horizontal alignment of gallery items relative to the right edge.

When changing the gallery’s orientation to horizontal via the GalleryControlGallery.Orientation property, the meaning of the ContentHorzAlignment property is swapped as well. In this instance, the ContentHorzAlignment property specifies the vertical alignment of gallery items relative to the top edge.

See Also