Nikita Goncharuk
Nikita Goncharuk

Reputation: 815

Close MvxMasterDetailPage

I have a simple application presentation:

enter image description here

When I run the application, I check to see if the user entered, and then I load the main page, if not, then I load the login page.

But when the user logout, I need to close MasterDetailPage (MvxMasterDetailPage) and load a simple NavigationPage (MvxContentPage), because I do not need the humburger menu on LoginPage.

How can I close MvxMasterDetailPage?

Upvotes: 1

Views: 145

Answers (1)

Nikita Goncharuk
Nikita Goncharuk

Reputation: 815

Yea, i found an answer: In LoginPage.xaml.cs add this attribute: [MvxContentPagePresentation(NoHistory = true)]

Here is the full class:

[XamlCompilation(XamlCompilationOptions.Compile)]
[MvxContentPagePresentation(NoHistory = true, Animated = true)]
public partial class LoginPage : MvxContentPage<LoginViewModel>
{
    public LoginPage ()
    {
        // ...
    }
}

Upvotes: 1

Related Questions