Blazor的Telerik UI?下载30天免费试用

取向

您可以控制Blazor菜单的方向,以便它水平或垂直地排序其项目。

默认方向是水平方向。

更改菜单的方向

Blazor菜单改变方向

设置方向

@*改变菜单的方向以适应你的布局*@    @code {MenuOrientation方向;public List MenuItems {get;设置;}公共类MenuItem{公共字符串文本{获取;设置;}公共字符串图标{获取;设置;}公共字符串Url{获取;设置; } public List Items { get; set; } } protected override void OnInitialized() { MenuItems = new List() { new MenuItem() { Text = "Share", Icon = "share", Items = new List() { new MenuItem() { Text = "FaceBook", Icon = "facebook", Url = "https://facebook.com" }, new MenuItem() { Text = "LinkedIn", Icon = "linkedin", Url = "https://linkedin.com" }, new MenuItem() { Text = "Twitter", Icon = "twitter", Url = "https://twitter.com" }, } }, new MenuItem() { Text = "Map Location", Icon = "marker-pin", Url = "https://maps.google.com" } }; base.OnInitialized(); } }

另请参阅

在本文中
Baidu
map