You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/tilelayout/events.md
+54-52Lines changed: 54 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,132 +3,134 @@ title: Events
3
3
page_title: TileLayout - Events
4
4
description: Events of the TileLayout for Blazor.
5
5
slug: tilelayout-events
6
-
tags: telerik,blazor,tile,layout,dashboard,events
6
+
tags: telerik,blazor, tilelayout, events
7
7
published: True
8
8
position: 30
9
9
---
10
10
11
11
# TileLayout Events
12
12
13
-
This article explains the events available in the Telerik TileLayout for Blazor:
13
+
This article explains the available events in the Telerik TileLayout for Blazor:
14
14
15
15
*[OnResize](#onresize)
16
16
*[OnReorder](#onreorder)
17
17
18
18
## OnResize
19
19
20
-
The `OnResize` event is fired when any tile is resized. It lets you respond to that change if needed - for example, call the `.Refresh()` method of a chart or otherwise repaint a child component in the content. You can also use it to, for example, update the saved [state](slug:tilelayout-state) for your users.
20
+
The TileLayout `OnResize` event fires when the user changes the dimensions of a tile. You can use the event to update the saved [TileLayout state](slug:tilelayout-state), or repaint a child component that needs it, such as the Telerik Chart.
21
21
22
-
The `OnResize` event provides an argument of type `TileLayoutResizeEventArgs`. It exposes two properties:
22
+
The `OnResize` event provides an argument of type `TileLayoutResizeEventArgs`. It exposes an `Id``string` property that holds the ID of the resized tile item.
23
23
24
-
*`Id` (`string`) of the resized item
25
-
26
-
>caption Respond to the Resize event and adjust components in the tile
24
+
>caption Handle the TileLayout OnResize event
27
25
28
26
````RAZOR
29
-
@* Respond to a tile resizing to resize its contents, if needed *@
30
-
31
27
<TelerikTileLayout Columns="4"
32
28
Resizable="true"
33
-
OnResize="@OnResizeHandler">
29
+
OnResize="@OnTileLayoutResize">
34
30
<TileLayoutItems>
35
-
<TileLayoutItem HeaderText="Resize me" RowSpan="2" ColSpan="2" Id="chart-tile">
31
+
<TileLayoutItem HeaderText="Resize Me" Id="chart-tile" RowSpan="2" ColSpan="2">
public List<object> chartData = new List<object>() { 10, 2, 5, 6 };
84
-
public string[] xAxisItems = new string[] { "Q1", "Q2", "Q3", "Q4" };
85
84
}
86
85
````
87
86
88
87
89
88
## OnReorder
90
89
91
-
The `OnReorder` event fires when tiles have been reordered. You can use it to, for example, update the saved [state](slug:tilelayout-state) for your users.
90
+
The TileLayout `OnReorder` event fires when the user drags a tile to another position, so that the tile order changes. You can use the event to update the saved [TileLayout state](slug:tilelayout-state).
92
91
93
-
The `OnReorder` event provides an argument of type `TileLayoutReorderEventArgs`. It exposes two properties:
92
+
The `OnReorder` event provides an argument of type `TileLayoutReorderEventArgs`. It exposes an `Id``string` property that holds the ID of the reordered tile item.
94
93
95
-
*`Id` (`string`) of the reordered item
96
-
97
-
>caption Respond to the OnReorder event
94
+
>caption Handle the TileLayout OnReorder event
98
95
99
96
````RAZOR
100
-
@* Handle the OnResized event *@
101
-
102
97
<TelerikTileLayout Columns="3"
103
98
Reorderable="true"
104
-
OnReorder="@OnReorderHandler">
99
+
OnReorder="@OnTileLayoutReorder">
105
100
<TileLayoutItems>
106
-
<TileLayoutItem HeaderText="Panel 1">
107
-
<Content>Regular sized first panel.</Content>
101
+
<TileLayoutItem HeaderText="Tile 1" Id="tile1">
102
+
<Content>Tile 1 content.</Content>
108
103
</TileLayoutItem>
109
-
<TileLayoutItem HeaderText="Panel 2">
110
-
<Content>You can put components in the tiles too.</Content>
0 commit comments