---
title: MenuViewModel
summary: API reference for MenuViewModel.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-09-17
library: SAIF.Framework.Web.Mvc
reference_type: package
---

# 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.OnActionExecuted` populates and `MenuExtensions` renders: 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](../../business-rules.md#br-22-active-menu-item-identified-by-app-and-page-link-match)). |
| IsMenuExpanded | `public bool IsMenuExpanded { get; set; }` | Always set to `true` by this library (see [BR-21](../../business-rules.md#br-21-business-online-menu-is-cached-once-per-session)-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](../../business-rules.md#br-23-external%2Finternal-user-status-resolved-once-per-request)). |

## Sources
- `src/Web.Mvc/ViewModels/MenuViewModel.cs`
