Back to Devexpress

GalleryControlGallery.ContentHorzAlignment Property

windowsforms-devexpress-dot-xtrabars-dot-ribbon-dot-gallery-dot-gallerycontrolgallery-1cbb1f1d.md

latest2.7 KB
Original Source

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

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(HorzAlignment.Default)]
[DXCategory("Layout")]
public HorzAlignment ContentHorzAlignment { get; set; }
vb
<DXCategory("Layout")>
<DefaultValue(HorzAlignment.Default)>
Public Property ContentHorzAlignment As HorzAlignment

Property Value

TypeDefaultDescription
HorzAlignmentDefault

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

|

Available values:

NameDescription
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

Orientation

GalleryControlGallery Class

GalleryControlGallery Members

DevExpress.XtraBars.Ribbon.Gallery Namespace