I created an application in which database loads on start and after few milliseconds it navigates to Mainpage. My problem is when I click back key from my mainpage the database loads again and comes back to Mainpage,Is there any solution?
I created an application in which database loads on start and after few milliseconds
Share
Two suggestions. One: load the database in the Application_Launching and the Application_Activated (when e.IsApplicationInstancePreserved == false) event handlers. When doing this, always ensure that MainPage is the page the app navigates to first. Your page can bind to values (from a backing ViewModel) that will change and fire the PropertyChanged event. This will cause the page to display the data.
The second solution is to modify this implementation of navigating to a login screen to match your needs of loading the database.