TileItemElement.ImageAlignment Property

Gets or sets the glyph position for the current TileItemElement.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[Browsable(false)]
[DefaultValue(TileItemContentAlignment.Default)]
[DXCategory("Appearance")]
public TileItemContentAlignment ImageAlignment { get; set; }
<Browsable(False)>
<DefaultValue(TileItemContentAlignment.Default)>
<DXCategory("Appearance")>
Public Property ImageAlignment As TileItemContentAlignment

Property Value

Type Default Description
TileItemContentAlignment

Default

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

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