When I was building a small application today, I re-activated it from the tombstone. At this time, I checked whether there was data in the activity event. If there was data, I had to navigateProgramA page (such as page a) in ). At the beginning, we were preparing to use navigationservice. navigate (). However, in APP. XAML. CS, navigationservice is regarded as a class by default, so it won't work. I asked the brothers in the group to know that in APP. XAML. CS, the navigation is written as follows:
If (Isolatedstoragesettings. applicationsettings. Contains ( " A " )) // Determine whether the conditions are met
{
Rootframe. navigated + = New System. Windows. Navigation. navigatedeventhandler (rootframe_navigated );
}
Void Rootframe_navigated ( Object Sender, system. Windows. Navigation. navigationeventargs E)
{
// What you need to do and navigate
Rootframe. navigate ( New Uri ( " /A. XAML " , Urikind. Relative ));
Rootframe. navigated-= rootframe_navigated;
}