using System.Collections.Generic; using Abp.Localization; namespace Abp.Application.Navigation { /// /// Represents an item in a . /// public class UserMenuItem { /// /// Unique name of the menu item in the application. /// public string Name { get; set; } /// /// Icon of the menu item if exists. /// public string Icon { get; set; } /// /// Display name of the menu item. /// public string DisplayName { get; set; } /// /// The Display order of the menu. Optional. /// public int Order { get; set; } /// /// The URL to navigate when this menu item is selected. /// public string Url { get; set; } /// /// A custom object related to this menu item. /// public object CustomData { get; set; } /// /// Target of the menu item. Can be "_blank", "_self", "_parent", "_top" or a frame name. /// public string Target { get; set; } /// /// Can be used to enable/disable a menu item. /// public bool IsEnabled { get; set; } /// /// Can be used to show/hide a menu item. /// public bool IsVisible { get; set; } /// /// Sub items of this menu item. /// public IList Items { get; set; } /// /// Creates a new object. /// public UserMenuItem() { } /// /// Creates a new object from given . /// public UserMenuItem(MenuItemDefinition menuItemDefinition, ILocalizationContext localizationContext) { Name = menuItemDefinition.Name; Icon = menuItemDefinition.Icon; DisplayName = menuItemDefinition.DisplayName.Localize(localizationContext); Order = menuItemDefinition.Order; Url = menuItemDefinition.Url; CustomData = menuItemDefinition.CustomData; Target = menuItemDefinition.Target; IsEnabled = menuItemDefinition.IsEnabled; IsVisible = menuItemDefinition.IsVisible; Items = new List(); } } }