I need to go to a specific page for the first time my application starts up to collect login information, etc. I use IsloatedStorageSettings to save the value to determine if this is the first application launch or not, which works well.
My problem is actually navigating on my “first launch” page, when the application is launched for the first time using the NavigationService, it seems that the NavigationService is not being created at this point so still empty. When is a NavigationService created or how can I get around this?
My code (in the constructor of my main page:
if ((bool)settings["firstRun"])
{
if (NavigationService != null)
{
NavigationService.Navigate(new Uri("/FirstRun.xaml", UriKind.Relative));
}
else
{
MessageBox.Show("Navigation service must be null?");
}
}
else
{
InitializeComponent();
}
source
share