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

TileItemElement.TextAlignment Property

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

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#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