I’m new to the Silverlight development stack in WP7 and have a need to blow away a view as I’m loading another.
//some good stuff happens so I need to load the next activity/view
NavigationService.Navigate(new Uri("/Checkout.xaml", UriKind.Relative));
But just before/or after this navigation I need to pop/finish the current activity
In Android I would call finish and in objective-c I would simply pop this view controller from the stack … but in WP7 I’m not sure how to remove this activity
Thank you in advance
You can finish off whatever you’re doing in the Page.OnNavigatedFrom handler, if you really need to. But I think you should explain what kind of logic you’re wanting to end. Async operations in other threads require a cancellation token to be dismissed, and UI rendering operations will end automatically when you change the view.
But remember that WP7 uses a back button, and thus keeps a navigation state. Meaning that the user expects to be able to press back, to return to the previous view, and having it look precisely like it was when they left it.
—
Flow of how it normally would pan out: