Skip to content

Commit b1cdddf

Browse files
chore(tabStrip): separate events article
1 parent 8312c1e commit b1cdddf

File tree

2 files changed

+51
-26
lines changed

2 files changed

+51
-26
lines changed

components/tabstrip/events.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Events
3+
page_title: TabStrip for Blazor | Events
4+
description: Events of the Tab Strip for Blazor
5+
slug: tabstrip-events
6+
tags: telerik,blazor,tab strip,events
7+
published: True
8+
position: 20
9+
---
10+
11+
# Tab Strip Events
12+
13+
This article explains the events available in the Telerik NumericTextbox for Blazor:
14+
15+
* [ActiveTabIndexChanged](#activetabindexchanged)
16+
17+
## ActiveTabIndexChanged
18+
19+
The `ActiveTabIndexChanged` event fires when the user changes the tab that is currently shown. The event handler receives the new index as an argument.
20+
21+
>caption Handle the tab selection changed event
22+
23+
````CSHTL
24+
@result
25+
26+
<TelerikTabStrip ActiveTabIndexChanged="@TabChangedHandler">
27+
<TabStripTab Title="First">
28+
First tab content. Click through the tabs.
29+
</TabStripTab>
30+
<TabStripTab Title="Second">
31+
Second tab content.
32+
</TabStripTab>
33+
<TabStripTab Title="Third">
34+
Third tab content.
35+
</TabStripTab>
36+
</TelerikTabStrip>
37+
38+
@code {
39+
string result {get;set;}
40+
void TabChangedHandler(int newIndex)
41+
{
42+
result = $"current tab {newIndex} selected on {DateTime.Now}";
43+
}
44+
}
45+
````
46+
47+
## See Also
48+
49+
* [TabStrip Overview]({%slug components/tabstrip/overview%})

components/tabstrip/overview.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -80,33 +80,8 @@ Active Tab Index: @ActiveTabIndex
8080
}
8181
````
8282

83-
>caption Handle the tab selection changed event
8483

85-
````CSHTL
86-
@result
87-
88-
<TelerikTabStrip ActiveTabIndexChanged="@TabChangedHandler">
89-
<TabStripTab Title="First">
90-
First tab content. Click through the tabs.
91-
</TabStripTab>
92-
<TabStripTab Title="Second">
93-
Second tab content.
94-
</TabStripTab>
95-
<TabStripTab Title="Third">
96-
Third tab content.
97-
</TabStripTab>
98-
</TelerikTabStrip>
99-
100-
@code {
101-
string result {get;set;}
102-
void TabChangedHandler(int newIndex)
103-
{
104-
result = $"current tab {newIndex} selected on {DateTime.Now}";
105-
}
106-
}
107-
````
108-
109-
>caption Extract information for the currently selected tab from your model. Alter the model to affect the tab strip.
84+
>caption Extract information for the currently selected tab from your model. Alter the model to affect the tab strip. Create tabs dynamically based on external data.
11085
11186
````CSHTML
11287
@result
@@ -155,3 +130,4 @@ Active Tab Index: @ActiveTabIndex
155130

156131
* [Live Demo: TabStrip](https://demos.telerik.com/blazor-ui/tabstrip/index)
157132
* [Live Demo: Tab Position](https://demos.telerik.com/blazor-ui/tabstrip/tabposition)
133+
* [Events]({%slug tabstrip-events%})

0 commit comments

Comments
 (0)