I have 2 pages (MainPage.xaml, second.xaml) MainPage.xaml is the login page. On this page, I send the login and password and get the result. I save them (the result) in Isolate Storage and go to the second.xaml page; The next time I run this application, I will extract the data from the isolated storage and I want to navigate the second .xaml, but I donβt know how
I'm trying to write
public MainPage() { InitializeComponent(); //function for Isolate storage InitializeSettings(); NavigationService.Navigate(new Uri("/Conversation.xaml", UriKind.Relative)); }
But this is not work) I realized that I canβt use the navigation code associated with the MainPage () constructor. Of course, I can make a simple button, but I wish quick navigation
I think maybe this is due to the App.xaml method
private void Application_Launching(object sender, LaunchingEventArgs e)
for example write my method
//function for Isolate storage InitializeSettings();
with navigation there? (navigation does not work in this example)
private void Application_Launching(object sender, LaunchingEventArgs e) { InitializeSettings(); NavigationService.Navigate(new Uri("/Conversation.xaml", UriKind.Relative)); }
Where can I use navigation, go straight to the second.xaml page without fully loading MainPage.xaml (maybe without MainPage.xaml)
source share