.Net Maui Navigation Page

Ronald Rex 811 Reputation points

Hi Friends,

I was wondering how do I create a Modal NavigationPage in my shell application. I am going to try to use a Modal NavigationPage in lieu of a Popup page because I was unable to update my listview using the MVVM community toolkit using a popup page. Any help would be greatly appreciated.

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,421 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,194 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 47,896 Reputation points Microsoft Vendor


    You can use Shell Navigation to do it.

    For example, if you want to navigate to the NewPage1, you should register this NewPage1 in the AppShell background code.

     public AppShell()
           Routing.RegisterRoute("NewPage1", typeof(NewPage1));

    Then you can navigate it by await Shell.Current.GoToAsync("NewPage1");

    If you want to pass data in navigation, you can refer this document:pass data in shell navigation

    As you said, you want to do Modal NavigationPage, if you want to hide the shell navigation bar, you can add Shell.NavBarIsVisible="False" in navigated page.

    <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"

    If you have issue about ListView cannot update, please open a new thread and post related code that could reproduce this issue.

    Best Regards,

    Leon Lu

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful