my application, currently, goes to the MainPage.xaml
at startup (I don't know where it has configured though).
I want to be able to start with another page in some conditions. I think I can add this code to Application_Launching()
in App.xaml.cs
page:
NavigationService.Navigate(new Uri("/SecondPage.xaml", UriKind.Relative));
but NavigationService
is not available in App.xaml.cs.
How can I start the application with another page if foo == true
?