diff --git a/docs/en/UI/Blazor/Page-Layout.md b/docs/en/UI/Blazor/Page-Layout.md index 61d91d66af..49ed1659f4 100644 --- a/docs/en/UI/Blazor/Page-Layout.md +++ b/docs/en/UI/Blazor/Page-Layout.md @@ -13,6 +13,37 @@ Title is used to render page title in the PageHeader. } ``` +## MenuItemName +Indicates current selected menu item name. Menu item name should match a unique menu item name defined using the [Navigation / Menu system](../Blazor/Navigation-Menu.md). In this case, it is expected from the theme to make the menu item "active" in the main menu. + +```csharp +@inject PageLayout PageLayout + +@code { + protected override async Task OnInitializedAsync() + { + PageLayout.MenuItemName = "MyProjectName.Products"; + } +} +``` + +Menu item name can be set on runtime too. + +```html +@inject PageLayout PageLayout + + + +@code{ + protected void SetCategoriesMenuAsSelected() + { + PageLayout.MenuItemName = "MyProjectName.Categories"; + } +} +``` + +> Be aware, The [Basic Theme](../Blazor/Basic-Theme.md) currently doesn't support the selected menu item since it is not applicable to the top menu. + ## BreadCrumbs BreadCrumbItems are used to render breadcrumbs in the PageHeader. ```csharp