Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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