Back to Devexpress

Gallery.ItemContentHorizontalAlignment Property

wpf-devexpress-dot-xpf-dot-bars-dot-gallery-740f140d.md

latest4.1 KB
Original Source

Gallery.ItemContentHorizontalAlignment Property

Gets or sets the horizontal alignment of a Content Grid (displaying a gallery item’s caption and description) within a gallery item. This is a dependency property.

Namespace : DevExpress.Xpf.Bars

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public HorizontalAlignment ItemContentHorizontalAlignment { get; set; }
vb
Public Property ItemContentHorizontalAlignment As HorizontalAlignment

Property Value

TypeDescription
HorizontalAlignment

A HorizontalAlignment value specifying the horizontal alignment of a Content Grid within a gallery item.

|

Remarks

A gallery item consists of the Glyph and Content regions. The Content Region displays a Content Grid that displays the gallery item’s Caption and Description. The ItemContentHorizontalAlignment property specifies the horizontal alignment of the Content Grid within the Content Region:

If the ItemContentHorizontalAlignment property is set to Stretch , the Content Grid is stretched to the width of the Content Region. Use the Gallery.ItemCaptionHorizontalAlignment property to specify the horizontal alignment of a gallery item’s caption within the Content Grid’s Caption cell.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemContentHorizontalAlignment property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

create-wpf-gallery-control/CS/GalleryControl_Ex/MainWindow.xaml#L24

xml
ItemDescriptionTemplate="{StaticResource ResourceKey=myItemDescriptionTemplate}"
     ItemContentHorizontalAlignment="Left"
>

wpf-create-a-ribboncontrol/CS/RibbonControl_Ex/MainWindow.xaml#L232

xml
IsItemDescriptionVisible="False"
ItemContentHorizontalAlignment="Stretch"
ItemContentVerticalAlignment="Center"

See Also

ItemCaptionHorizontalAlignment

ItemCaptionVerticalAlignment

ItemContentHorizontalAlignment

ItemContentVerticalAlignment

ItemDescriptionHorizontalAlignment

ItemDescriptionVerticalAlignment

ItemGlyphHorizontalAlignment

ItemGlyphVerticalAlignment

ItemGlyphLocation

Caption

Description

Glyph

Gallery Class

Gallery Members

DevExpress.Xpf.Bars Namespace