Tombstoning WP7

Nov 11, 2010 at 10:59 PM

hello all,

i have created a project using prism pattern. when i came out of the application and clicks the back button, I am getting AccessViolationException.
How to handle the tomstoning in WP7 for prism patterns?

here's my code


private void Application_Launching(object sender, LaunchingEventArgs e)
{
Helpers.Bootstrapper = new Bootstrapper();
Helpers.Bootstrapper.Run();
}

// Code to execute when the application is activated (brought to foreground)
// This code will not execute when the application is first launched
private void Application_Activated(object sender, ActivatedEventArgs e)
{
}

// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
}

// Code to execute when the application is closing (eg, user hit Back)
// This code will not execute when the application is deactivated
private void Application_Closing(object sender, ClosingEventArgs e)
{
}

private void RootFrame_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
if (e.Content != null && !e.Uri.ToString().Contains("external"))
{
if (Helpers.Bootstrapper != null)
{
Helpers.Bootstrapper.CreateShell(e.Content as PhoneApplicationPage);
IEventAggregator _aggregator = Helpers.Bootstrapper.Container.Items.Resolve<WP7.Composite.Events.IEventAggregator>();

}
}
}

Nov 12, 2010 at 1:08 PM
Edited Nov 12, 2010 at 1:08 PM

Hi,

Although this is official Prism forum, I would suggest trying over at http://wp7guide.codeplex.com/ for help with the Windows Phone 7 version of Prism .

Fernando Antivero
http://blogs.southworks.net/fantivero