windowsforms-devexpress-dot-xtragrid-dot-views-dot-tile-dot-tileviewoptionshtmltemplate.md
Gets or sets whether tiles automatically adjust their height to fit text and images they display. This property is in effect when you use HTML and CSS-based templates to render tiles.
Namespace : DevExpress.XtraGrid.Views.Tile
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DefaultValue(false)]
[XtraSerializableProperty]
public bool ItemAutoHeight { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Property ItemAutoHeight As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true if tiles automatically adjust their height to fit their contents; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to ItemAutoHeight |
|---|---|
| TileView |
.OptionsHtmlTemplate .ItemAutoHeight
|
The following image demonstrates a sample Tile View that renders tiles from an HTML and CSS-based template. The ItemAutoHeight property is set to true, so the tiles have different heights to fit their contents:
Run Demo: Tile View - Item Auto Height
If the ItemAutoHeight property is set to false, the tile height is specified by the Height attribute of the TileView.OptionsTiles.ItemSize property.
See the TableRowDefinition.AutoHeight topic description for information on how to enable the tile auto-height feature when tiles are rendered from regular (non HTML and CSS-based) templates.
Note
The tile auto-height feature is not supported when Tile Views are bound to server-mode data sources.
See Also
TileViewOptionsHtmlTemplate Class