A newer version of this page is available. Switch to the current version.

TileItemElement.AnchorElement Property

Gets or sets an AnchorElement, relative to which this TileItemElement is aligned.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll


public TileItemElement AnchorElement { get; set; }

Property Value

Type Default Description


An AnchorElement, relative to which this TileItemElement is aligned.


There are multiple properties to align element text and images within the parent tile item or tile frame. The TileItemElement.TextAlignment and TileItemElement.ImageAlignment properties align the target content relative to tile item’s corners. The TileItemElement.TextLocation and TileItemElement.ImageLocation properties allow you to position these blocks using precise coordinates. If none of these options fit your requirements, the AnchorElement property allows you to anchor a TileItemElement to another TileItemElement. The figure below illustrates the example.

TileItemElement - Anchors Scheme

In the image above, the tile has two TileItemElements. The Anchor Element is positioned at the middle left side of the tile item. The Target Element uses the AnchorElement property to anchor itself to the Anchor Element. The TileItemElement.AnchorAlignment property specifies the anchor direction, while the TileItemElement.AnchorIndent and TileItemElement.AnchorOffset properties set the horizontal and/or vertical distance between these anchored elements.

When elements are bound using these anchor properties, this relationship persists whenever the parent tile changes its size (see the TileItem.ItemSize property). The figure above illustrates the same tile with two sizes applied - large and wide. In both of the sizes the Target Element keeps its position relative to the Anchor Element.

See Also