TileView.TileTemplate Property

Provides access to the template from which all tiles are generated by default.

Namespace: DevExpress.XtraGrid.Views.Tile

Assembly: DevExpress.XtraGrid.v20.2.dll

Declaration

[Browsable(false)]
[DXCategory("Properties")]
public TileItemElementCollection TileTemplate { get; }
<Browsable(False)>
<DXCategory("Properties")>
Public ReadOnly Property TileTemplate As TileItemElementCollection

Property Value

Type Description
TileItemElementCollection

A TileItemElementCollection object that is the template applied to all TileViewItems in this TileView.

Remarks

By default, all tiles within a TileView are generated from a template specified by the TileTemplate property. By handling the TileView.CustomItemTemplate event, you can supply custom templates for tiles.

To create a tile template at design time, use the Data Grid Designer's Tile Template page.

Designer-TileTemplatePage-Empty.png

The following example shows how to modify the default template in code.

tileView1.TileTemplate.Add(new TileViewItemElement() { Column = colAddress, TextAlignment = TileItemContentAlignment.MiddleCenter });

Even when using a single template, you can customize the appearance of individual tiles by handling the TileView.ItemCustomize event.

See Also