Hello,
I am trying to navigate to other pages from a popup message. Is it possible to do it?
After testing, this functionality could be achieved using the MAUI CommunityToolkit's Popup control.
You could refer to the following steps.
Step 1. Create pop-ups based on Popup's documentation: Popup.
Step 2. Register the route according to the documentation of MAUI navigation: Register detail page routes.
Routing.RegisterRoute("Page1", typeof(NewPage1));
Step 3. Add a button to the Popup page and implement the page jump function.
<Button Text="Navi_Test" Clicked="Button_Clicked"/>
private void Button_Clicked(object sender, EventArgs e)
{
this.Close();
AppShell.Current.GoToAsync("Page1");
}
It has been tested that using this method does not cause the program to crash when the back button is clicked.
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.