TileItemElement.TextAlignment Property

Gets or sets the alignment of the TileItemElement‘s text content.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v21.1.dll

Declaration

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

Property Value

Type Default Description
TileItemContentAlignment

Default

A TileItemContentAlignment enumerator value specifying the alignment of the TileItemElement‘s text content.

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

Using the TextAlignment property you can place the current TileItemElement‘s text content at one of nine predefined positions. Additionally, you can utilize the TileItemElement.TextLocation property to apply a text offset and shift the text block from its predefined position. If the TextAlignment property equals Manual, this offset will be counted from the top left corner of a tile.

If text is grouped with the TileItemElement‘s glyph (the TileItemElement.ImageToTextAlignment property is not none), the TextAlignment property is ignored and the group is arranged according to the TileItemElement.ImageAlignment property. See the Tile Item Structure topic to learn more.

The figure below illustrates a TileItem with five different options of text alignment:

Tile TextAlignment Manual Example

See Also