MenuViewModel¶
The fully decorated menu shape MenuControllerBase.OnActionExecuted populates and MenuExtensions renders: favorites, all items, current application/item context, category, and expansion state.
Purpose¶
- The fully decorated menu shape
MenuControllerBase.OnActionExecutedpopulates andMenuExtensionsrenders: favorites, all items, current application/item context, category, and expansion state.
Context¶
- Namespace:
SAIF.Web.Mvc.ViewModels - Assembly/package:
SAIF.Framework.Web.Mvc (source-shipping NuGet package) - Kind: class
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| Favorites | public IList<MenuItemViewModel> Favorites { get; set; } |
The user's favorited menu items. |
| Items | public IList<MenuItemViewModel> Items { get; set; } |
All menu items visible to the user. |
| CurrentApplicationName | public string CurrentApplicationName { get; set; } |
The current request's application name, used to scope current-item detection. |
| CurrentItemId | public string CurrentItemId { get; set; } |
The PageId of the menu item matching the current request's URL, or "" when no match exists (see BR-22). |
| IsMenuExpanded | public bool IsMenuExpanded { get; set; } |
Always set to true by this library (see BR-21-adjacent decoration logic). |
| MenuCategory | public string MenuCategory { get; set; } |
The current controller's declared category, used to scope RenderTopMenu. |
| IsExternalUser | public bool IsExternalUser { get; set; } |
Whether the current user is external, sourced from ApplicationUser.IsExternal (see BR-23). |
Sources¶
src/Web.Mvc/ViewModels/MenuViewModel.cs