Issue
If I navigate to other pages from the Shell menu items then I have the option to open the pull-out menu again. And if I go to the page from the code inside, then the menu button at the top left is no longer there.
await Shell.Current.GoToAsync("step");
How to open a page from the code and what would be in the open page was the shell menu button?
Solution
If you navigate to the page that exists as part of the Shell visual hierarchy and register the route like below.
<ShellContent
Title="Page1"
ContentTemplate="{DataTemplate local:Page1}"
Icon="tab_about.png"
Route="about" />
It could navigate with the parameter like below.
await Shell.Current.GoToAsync("//about");
When you navigate, the hamburger icon would still be there.
If you navigate to the page that not exist in Shell visual hierarchy and register using Routing.RegisterRoute
, it would cover all the page and the hamburger icon would not show. But you could back to the Shell with the back button on top left.
Routing.RegisterRoute("step", typeof(Page2));
Answered By - Wendy Zang - MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.