Creating Menu Items
In Bloqs, you can create menu items to navigate between pages in your application. Menu items are displayed in the left drawer of the app, providing users with easy access to different pages.
Example
builder.AddMenuItem(
new MenuItem
{
Name = "Home", // Display name for the menu
PageId = AppConstants.Pages.HomePage // The page this menu item links to
}
);Explanation
Name– The text displayed in the left drawer menu.PageId– References the unique identifier of the page this menu item should open (usually stored inAppConstants).
Using AddMenuItem, you can build a navigation structure for your app programmatically. Menu items in the left drawer can be easily added, removed, or reordered as your application grows, ensuring smooth and intuitive navigation for users.
PreviousAdding Pages and Components to the App ModelNextRegistering Entity Classes and Creating CRUD Pages
Last updated