I have an app, and when the RootFrame is first initialized, I have it checking if its the first time the app has been launched. If it is, it changes the RootFrame UriMapper to a tutorial page. the problem is, I can't seem to figure out a way to redirect the user back to MainPage.xaml. It just won't do anything so far.
This is the code I'm using for changing the initial start up page in the App constructor:
if (App.Model.SelectFirstStart())
{
var mapper = new UriMapper();
mapper.UriMappings.Add(new UriMapping
{
Uri = new Uri("/MainPage.xaml", UriKind.Relative),
MappedUri = new Uri("/TutorialPage.xaml", UriKind.Relative)
});
RootFrame.UriMapper = mapper;
}
When the user taps a button in the tutorial page, it should redirect them to the MainPage.xaml. This is what I've tried so far:
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
And:
App.RootFrame.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
Any help would be much appreciated. Thank you