TileItemElement.AnchorElement Property
Gets or sets an AnchorElement, relative to which this TileItemElement is aligned.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[DefaultValue(null)]
[DXCategory("Appearance")]
public TileItemElement AnchorElement { get; set; }
Property Value
Type | Default | Description |
---|---|---|
TileItemElement | null | An AnchorElement, relative to which this TileItemElement is aligned. |
Remarks
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.
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.