The first step is to remove the default page that we set by default in the manifest file (WMAppManifest.xml) in applications created from standard templates.
Just remove NavigationPage = "MainPage.xaml" from the code below.
<Tasks>
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
</Tasks>
InitializePhoneApplication(), RootFrame.Navigate() ( App.xaml.cs).
private void InitializePhoneApplication()
{
if (phoneApplicationInitialized)
return;
RootFrame = new PhoneApplicationFrame();
RootFrame.Navigated += CompleteInitializePhoneApplication;
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
RootFrame.Navigated += CheckForResetNavigation;
phoneApplicationInitialized = true;
Uri uri;
if (IsolatedStorageSettings.ApplicationSettings.Contains("islogin"))
{
if (!(Convert.ToString(IsolatedStorageSettings.ApplicationSettings["islogin"]).ToLower() == "yes"))
{
RootFrame.Navigate(new Uri("/LoginScreen.xaml", UriKind.RelativeOrAbsolute));
}
else
{
RootFrame.Navigate(new Uri("/HomeScreen.xaml", UriKind.RelativeOrAbsolute));
}
}
else
{
RootFrame.Navigate(new Uri("/LoginScreen.xaml", UriKind.RelativeOrAbsolute));
}
}