Class
TelerikTileLayout

The class for the Telerik TileLayout component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikTileLayout : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikTileLayout

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Constructors

TelerikTileLayout()

Declaration

cs-api-definition
public TelerikTileLayout()

Properties

ColumnSpacing

Sets the horizontal space between tile columns using CSS units. Use pixel values like "16px" (default), "20px", or percentage values like "2%". When different from RowSpacing, creates asymmetric spacing for custom layouts.

Declaration

cs-api-definition
[Parameter]
public string ColumnSpacing { get; set; }

Property Value

string

ColumnWidth

Controls the width of each column in the TileLayout using CSS values. Use "1fr" (default) for equal-width flexible columns, "200px" for fixed pixel widths, or "20%" for percentage-based widths. Works together with Columns to define the overall TileLayout structure that is based on a CSS grid. A fixed absolute value is required when Resizable is enabled to ensure proper tile resizing behavior.

Declaration

cs-api-definition
[Parameter]
public string ColumnWidth { get; set; }

Property Value

string

Columns

Sets the fixed number of columns in the TileLayout. Use positive values like 2, 3, or 4. To define the column widths, use ColumnWidth.

Declaration

cs-api-definition
[Parameter]
public int Columns { get; set; }

Property Value

int

Height

Controls the total height of the TileLayout component using CSS values. Use "600px" for fixed pixel height, "100vh" for full viewport height, "50%" for percentage of parent height, or leave unset for automatic vertical expansion. When not set, the component automatically expands to fit all tile rows based on RowHeight.

Declaration

cs-api-definition
[Parameter]
public string Height { get; set; }

Property Value

string

Navigable

Enables keyboard navigation and interaction with the TileLayout component. When enabled, users can navigate between tiles using arrow keys, resize tiles using Ctrl+Arrow keys, and reorder tiles using Shift+Arrow keys. Provides accessibility support for users who prefer or require keyboard-only interaction. The default value is false.

Declaration

cs-api-definition
[Parameter]
public bool Navigable { get; set; }

Property Value

bool

OnReorder

Fires when a user completes reordering a tile by dragging it to a new position. The event provides the Id of the moved tile to identify which tile was repositioned. Use this event to save layout changes, update data models, or respond to user layout rearrangements. Only triggered when Reorderable is enabled.

Declaration

cs-api-definition
[Parameter]
public EventCallback<TileLayoutReorderEventArgs> OnReorder { get; set; }

Property Value

EventCallback<TileLayoutReorderEventArgs>

OnResize

Fires when a user completes resizing a tile by dragging its resize handles. The event provides the Id of the resized tile to identify which tile was modified. Use this event to save layout changes, update data models, or respond to user layout customizations. Only triggered when Resizable is enabled.

Declaration

cs-api-definition
[Parameter]
public EventCallback<TileLayoutResizeEventArgs> OnResize { get; set; }

Property Value

EventCallback<TileLayoutResizeEventArgs>

Reorderable

Enables users to reorder tiles by dragging them to new positions. When enabled, users can click and drag any tile header to rearrange the layout order. The other tiles automatically adjust their positions during the drag operation. Triggers the OnReorder event when users complete a reorder operation.

Declaration

cs-api-definition
[Parameter]
public bool Reorderable { get; set; }

Property Value

bool

Resizable

Enables users to resize tiles by dragging their edges or corners. When enabled, tile edges show resize arrows on mouseover. Requires both RowHeight and ColumnWidth to have fixed absolute CSS values (not "auto") for proper resize operation. Triggers the OnResize event when users complete a resize operation.

Declaration

cs-api-definition
[Parameter]
public bool Resizable { get; set; }

Property Value

bool

RowHeight

Controls the height of each row in the TileLayout using CSS values. Use "1fr" (default) for equal-height flexible rows, "150px" for fixed pixel heights, or "20%" for percentage-based heights. A fixed absolute value is required when Resizable is enabled to ensure proper tile resizing behavior.

Declaration

cs-api-definition
[Parameter]
public string RowHeight { get; set; }

Property Value

string

RowSpacing

Sets the vertical space between tile rows using CSS units. Use pixel values like "16px" (default), "20px", or percentage values like "2%". When different from ColumnSpacing, creates asymmetric spacing for custom layouts.

Declaration

cs-api-definition
[Parameter]
public string RowSpacing { get; set; }

Property Value

string

TileLayoutItems

Contains the collection of tiles that make up the TileLayout content. Place individual TileLayoutItem components inside this container to define your dashboard, workspace, or custom tile-based interface. Each tile can have different content and span multiple rows or columns. Children: TileLayoutItem tags.

Declaration

cs-api-definition
[Parameter]
public RenderFragment TileLayoutItems { get; set; }

Property Value

RenderFragment

Width

Controls the total width of the TileLayout component using CSS values. Use "80%" for container-relative width, "800px" for fixed pixel width, "80vw" for viewport-relative width. When not set, the component expands to fill its parent container horizontally.

Declaration

cs-api-definition
[Parameter]
public string Width { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

Dispose()

Declaration

cs-api-definition
public override void Dispose()

Overrides BaseComponent.Dispose()

GetState()

Retrieves the current state of all tiles including their positions, sizes, and order. The returned TileLayoutState contains a complete snapshot of the layout that can be stored, modified, or applied later using SetState(TileLayoutState). Use this method to implement save/restore functionality or layout persistence.

Declaration

cs-api-definition
public TileLayoutState GetState()

Returns

TileLayoutState

A TileLayoutState object containing the current layout configuration.

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides ComponentBase.SetParametersAsync(ParameterView)

SetState(TileLayoutState)

Applies a saved layout state to update tile positions, sizes, and order. The state values are applied sequentially to tiles in the component markup based on their declared order. Use this method to restore previously saved layouts, implement layout presets, or programmatically modify the layout. The component will automatically re-render to reflect the new layout after applying the state.

Declaration

cs-api-definition
public void SetState(TileLayoutState source)

Parameters

source

TileLayoutState

A TileLayoutState object containing the layout configuration to apply.