I would like to know if there is a way to set my sidemenu to open up to the location(urI) that the user is on, on app startup.
If the user navigates using the sidemenu it is fine, however if the app starts and the user is on a uri Eg /dashboard the sidemenu is closed.
(I have nested items Eg dashboard is within an item "All")
August 3, 2020, 8:17am
You can set desired page as start page and the menu will respect it:
thank you for the prompt response, however if the user has a old url and navigates directly to a non startup page?
Is there a way to handle this?
Another quick question was around the header and footer, is there a way to update the text dynamically ?
August 3, 2020, 9:24am
The menu is synchronized with the navigation. If you open some page no matter if this page is set as start or not the menu will select the item related to the current page:
Header and footer text are actually Label components and you can bind Text property to a Page property that can be changed dynamically:
Hi, this is not the case for nested menu items - see screenshot
However if you expand the parent the correct child is selected. Is there a way to have the parent auto expand if one of its child items is selected?
August 3, 2020, 9:44am
Such feature (auto expand) is not supported out-of-the-box. You can use NavigationManager LocationChanged event to provide it for your case. Check also the
source code of our demos - might help you as well.
Thanks for the info Enchev.
Regarding the Header and footer, this is in the MainLayout and I want this to bind to a property in the different content pages, do you have some code I could look at to assist with this?
August 3, 2020, 11:16am
You can bind it to a global property. Just check the "Global" check box when setting the property from a page and it will be available in the layout as well.