Hello,
For your needs, you can use the following techniques and documentations to implement them.
For the menu bar on the left, it's actually a Shell Flyout, and you can set its visibility to Locked to keep it displayed.
Locked – indicates that the flyout can't be closed by the user, and that it doesn't overlap content.
And since the navigation is directly controlled by the shell, the need to click on the menu item to switch to the next page can be directly realized.
refresh page 1
For refresh operations, you need to use the RefreshView
and bind its refresh state to the ViewModel to let the user know the refresh state.
IsRefreshing, of type bool, which indicates the current state of the RefreshView.
command button in page 2=> page 3
Since navigation is controlled by the shell, you can use GoToAsync
to navigate through routes.
await Shell.Current.GoToAsync("//animals/monkeys");
Code samples are provided in the examples above, which you can combine into your own projects.
Update:
After in-depth testing of your sample project, this issue is related to Visual Studio's Hot Reload.
With Hot Reload enabled, each repeated click on a Menu Item will result in a 10MB increase in memory, which will eventually lead to a memory leak. If Hot Reload is turned off, the program's memory will continue to stabilize at 160Mb after fluctuations.
You could refer to XAML Hot Reload for .NET MAUI Visual Studio to disable this feature.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.