Skip to main content

TileItemElement.ImageAlignment Property

Gets or sets the glyph position for the current TileItemElement.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[Browsable(false)]
[DefaultValue(TileItemContentAlignment.Default)]
[DXCategory("Appearance")]
public TileItemContentAlignment ImageAlignment { get; set; }

Property Value

Type Default Description
TileItemContentAlignment Default

A TileItemContentAlignment enumerator value that specifies the glyph position for the current TileItemElement.

Available values:

Show 11 items
Name Description
Default

Default content alignment.

TopLeft

Content appears vertically aligned on the top, and horizontally aligned on the left.

TopCenter

Content appears vertically aligned on the top, and horizontally aligned at the center.

TopRight

Content appears vertically aligned on the top, and horizontally aligned on the right.

MiddleLeft

Content appears vertically aligned at the center, and horizontally aligned on the left.

MiddleCenter

Content is horizontally and vertically aligned at the center.

MiddleRight

Content appears vertically aligned at the center, and horizontally aligned on the right.

BottomLeft

Content appears vertically aligned at the bottom, and horizontally aligned on the left.

BottomCenter

Content appears vertically aligned at the bottom, and horizontally aligned at the center.

BottomRight

Content appears vertically aligned at the bottom, and horizontally aligned on the right.

Manual

Indicates that manual text alignment, based on the TileItemElement.TextLocation coordinates, should be used.

Remarks

A TileItemElement can contain text (TileItemElement.Text) and a glyph (TileItemElement.Image). Depending on the ImageAlignment property value, the glyph can have one of nine predefined positions.The TileItemElement.ImageScaleMode sets the icon’s scale options.

You can additionally shift an element icon from its predefined position by applying an image offset. To do so, utilize the TileItemElement.ImageLocation property. If the ImageAlignment property is set to Manual, the offset will be counted from the tile item’s top left corner.

Alternatively, you can use the TileItem.ImageAlignment property. However, since a tile item can have multiple icons provided via the TileItem.Elements collection, the TileItem.ImageAlignment property affects an image in the first collection item only. To specify other elements’ image alignment, the ImageAlignment property is required.

See the Tile Item Structure topic to learn more.

See Also