Search code examples
c#win-universal-appwindows-10-universalsplitview

How to dismiss splitView in windows 10 universal app?


I have a login page from which I go to another page with a splitview menu. In this menu there is an option for log out from the app. In this case, I want to go to the login page again, but I don't know how to charge that page in the full page (only charge the page in the content frame but the split view is still there). How can I clear/dismiss it? Thanks!


Solution

  • I don't know your implementation but this should work on any page:

    this.Frame.Navigate(typeof(YourLoginPageType));
    

    or this should work everywhere

    Frame rootFrame = (Frame)Window.Current.Content;
    rootFrame.Navigate(typeof(YourLoginPageType));