@@ -30,11 +30,14 @@ Use your own NavLink elements for navigation instead of the built-in feature of
30
30
var shouldNavigate = !string.IsNullOrEmpty(item.Page);
31
31
if (shouldNavigate)
32
32
{
33
- <NavLink href="@item.Page">@item.Section</NavLink>
33
+ @*k-menu-link-text will expand the NavLink to match default Menu styling*@
34
+ <NavLink href="@item.Page" class="k-menu-link-text">@item.Section</NavLink>
34
35
}
35
36
else
36
37
{
37
- <span style="font-weight: bold;">See more about our @item.Section.ToLowerInvariant()</span>
38
+ @*k-menu-link-text will expand the span to match default Menu styling*@
39
+ <span style="font-weight: bold;" class="k-menu-link-text">
40
+ See more about our @item.Section.ToLowerInvariant()</span>
38
41
}
39
42
}
40
43
</ItemTemplate>
@@ -53,12 +56,12 @@ Use your own NavLink elements for navigation instead of the built-in feature of
53
56
protected override void OnInitialized()
54
57
{
55
58
MenuItems = new List<MenuItem>()
56
- {
59
+ {
57
60
new MenuItem()
58
61
{
59
62
Section = "Company",
60
63
SubSectionList = new List<MenuItem>()
61
- {
64
+ {
62
65
new MenuItem()
63
66
{
64
67
Section = "Overview",
@@ -80,7 +83,7 @@ Use your own NavLink elements for navigation instead of the built-in feature of
80
83
{
81
84
Section = "Services",
82
85
SubSectionList = new List<MenuItem>()
83
- {
86
+ {
84
87
new MenuItem()
85
88
{
86
89
Section = "Consulting",
@@ -110,7 +113,8 @@ Use your own NavLink elements for navigation instead of the built-in feature of
110
113
@{
111
114
if (EqualityComparer<MenuItem>.Default.Equals(item, SelectedMenuItem))
112
115
{
113
- <span style="color: black; font-weight: bold">@item.Text</span>
116
+ @*k-menu-link-text will expand the span to match default Menu styling*@
117
+ <span style="color: black; font-weight: bold" class="k-menu-link-text">@item.Text</span>
114
118
}
115
119
else
116
120
{
@@ -119,7 +123,8 @@ Use your own NavLink elements for navigation instead of the built-in feature of
119
123
{
120
124
target = "_blank";
121
125
}
122
- <NavLink target="@target" href="@item.Url" class="k-link k-menu-link">@item.Text</NavLink>
126
+ @*k-menu-link-text will expand the NavLink to match default Menu styling*@
127
+ <NavLink target="@target" href="@item.Url" class="k-menu-link-text">@item.Text</NavLink>
123
128
}
124
129
}
125
130
</ItemTemplate>
@@ -194,8 +199,8 @@ Use your own NavLink elements for navigation instead of the built-in feature of
194
199
}
195
200
return !(url.StartsWith("https://") || url.StartsWith("http://"));
196
201
}
197
-
198
- public class MenuItem
202
+
203
+ public class MenuItem
199
204
{
200
205
public string Text { get; set; }
201
206
public string Url { get; set; }
@@ -210,6 +215,5 @@ Use your own NavLink elements for navigation instead of the built-in feature of
210
215
211
216
## See Also
212
217
213
- * [ Data Binding a Menu] ({%slug components/menu/data-binding/overview%})
214
- * [ Live Demo: Menu Temlate] ( https://demos.telerik.com/blazor-ui/menu/template )
215
-
218
+ * [ Data Binding a Menu] ({%slug components/menu/data-binding/overview%})
219
+ * [ Live Demo: Menu Temlate] ( https://demos.telerik.com/blazor-ui/menu/template )
0 commit comments