Skip to content

Commit 977ec6d

Browse files
author
User Jenkins
committed
Sync with Kendo UI Professional
1 parent 94dff2a commit 977ec6d

File tree

4 files changed

+147
-0
lines changed

4 files changed

+147
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Animations
3+
page_title: Animations
4+
description: "Learn how to control the animations in the Telerik UI TabStrip HtmlHelper for {{ site.framework }}."
5+
slug: htmlhelpers_tabstrip_animations_aspnetcore
6+
position: 8
7+
---
8+
9+
# Animations
10+
11+
By default, the TabStrip uses animations to reveal the content of the tabs. You can modify these animations through the `Animation` configuration option.
12+
13+
The following example demonstrates how to configure the TabStrip animation:
14+
15+
```
16+
@(Html.Kendo().TabStrip()
17+
.Name("tabstrip")
18+
.Animation(animation =>
19+
{
20+
animation.Enable(true);
21+
animation.Open(config =>
22+
{
23+
config.Expand(ExpandDirection.Vertical);
24+
config.Fade(FadeDirection.In);
25+
config.Duration(AnimationDuration.Slow);
26+
});
27+
animation.Close(config =>
28+
{
29+
config.Reverse(true);
30+
});
31+
})
32+
.Items(tabstrip =>
33+
{
34+
// add TabStrip items
35+
})
36+
)
37+
```
38+
39+
## See Also
40+
41+
* [Animations in the TabStrip HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/tabstrip/animation)
42+
* [Server-Side API](/api/tabstrip)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: Images
3+
page_title: Images
4+
description: "Learn how to include images and sprite icons in the Telerik UI TabStrip HtmlHelper for {{ site.framework }}."
5+
slug: htmlhelpers_tabstrip_images_aspnetcore
6+
position: 7
7+
---
8+
9+
# Images
10+
11+
The TabStrip allows you to include images or sprite icons in its tabs.
12+
13+
## Images
14+
15+
To include images in the Telerik UI for {{ site.framework }} TabStrip items, use the `.ImageUrl()` configuration option and pass the image Url as a parameter:
16+
17+
```
18+
@(Html.Kendo().TabStrip()
19+
.Name("tabstrip-images")
20+
.Items(tabstrip =>
21+
{
22+
tabstrip.Add().Text("Baseball")
23+
.ImageUrl(Url.Content("~/shared/icons/sports/baseball.png"))
24+
.Content(@<text>
25+
Baseball content
26+
</text>);
27+
tabstrip.Add().Text("Football")
28+
.ImageUrl(Url.Content("~/shared/icons/sports/football.png"))
29+
.Content(@<text>
30+
Football content
31+
</text>);
32+
tabstrip.Add().Text("Basketball")
33+
.ImageUrl(Url.Content("~/shared/icons/sports/basketball.png"))
34+
.Content(@<text>
35+
Basketball content
36+
</text>);
37+
})
38+
)
39+
```
40+
41+
## Sprites
42+
43+
To include sprites in the Telerik UI for {{ site.framework }} TabStrip items, use the `.SpriteCssClasses()` configuration option and specify the sprite CSS class:
44+
45+
```
46+
@(Html.Kendo().TabStrip()
47+
.Name("tabstrip-sprites")
48+
.Items(tabstrip =>
49+
{
50+
tabstrip.Add().Text("Brazil")
51+
.SpriteCssClasses("brazilFlag")
52+
.Content(@<text>
53+
Brazil, officially the Federative Republic of Brazil, is the largest country in South America.
54+
</text>);
55+
56+
tabstrip.Add().Text("India")
57+
.SpriteCssClasses("indiaFlag")
58+
.Content(@<text>
59+
India, officially the Republic of India, is a country in South Asia.
60+
</text>);
61+
62+
tabstrip.Add().Text("Netherlands")
63+
.SpriteCssClasses("netherlandsFlag")
64+
.Content(@<text>
65+
The Netherlands is a constituent country of the Kingdom of the Netherlands, located mainly in North-West Europe and with several islands in the Caribbean.
66+
</text>);
67+
})
68+
.SelectedIndex(0)
69+
)
70+
```
71+
72+
## See Also
73+
74+
* [Images in the TabStrip HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/tabstrip/images)
75+
* [TabStrip Server-Side API](/api/tabstrip)

docs-aspnet/html-helpers/navigation/tabstrip/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ The following example demonstrates the basic configuration of the TabStrip HtmlH
109109

110110
* [Tabs]({% slug htmlhelpers_tabstrip_aspnetcore_tabs %})
111111
* [Tab content]({% slug htmlhelpers_tabstrip_aspnetcore_content %})
112+
* [Animation Effects]({% slug htmlhelpers_tabstrip_animations_aspnetcore %})
113+
* [Images]({% slug htmlhelpers_tabstrip_images_aspnetcore %})
112114

113115
## Events
114116

docs-aspnet/html-helpers/navigation/tabstrip/tabs.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,34 @@ position: 2
1010

1111
The TabStrip provides advanced options for configuring its tabs.
1212

13+
## Tabs Positioning
14+
15+
The TabStrip API provides the `.TabPosition()`[/api/Kendo.Mvc.UI.Fluent/TabStripBuilder#tabpositionkendomvcuitabstriptabposition] configuration option that allows you to set the position of the tabs. You can position the tabs to the top, left, right or bottom of the TabStrip via the [`TabStripTabPosition`](/api/Kendo.Mvc.UI/TabStripTabPosition)
16+
17+
The following example demonstrates how to position the TabStrip tabs to the right:
18+
19+
```
20+
@(Html.Kendo().TabStrip()
21+
.Name("tabstrip")
22+
.TabPosition(TabStripTabPosition.Right)
23+
.Items(items =>
24+
{
25+
items.Add().Text("One")
26+
.Content(@<text>
27+
<p>Tab One</p>
28+
</text>);
29+
items.Add().Text("Two")
30+
.Content(@<text>
31+
<p>Tab Two</p>
32+
</text>);
33+
items.Add().Text("Three")
34+
.Content(@<text>
35+
<p>Tab Three</p>
36+
</text>);
37+
})
38+
)
39+
```
40+
1341
## Dynamic Tabs
1442

1543
The TabStrip API provides methods for dynamically adding or removing TabStrip bars.

0 commit comments

Comments
 (0)