When the application loses his focus (e.g. open the browser) following exception will be thrown:
System.NullReferenceException: Object reference not set to an instance of an object.
at Xamarin.Forms.Platform.WinPhone.FormsApplicationPage.OnDeactivated(Object sender, DeactivatedEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Microsoft.Phone.Shell.PhoneApplicationService.FireDeactivated(UInt32 reason)
at Microsoft.Phone.TaskModel.Interop.ITask.Pause.Invoke(UInt32 reason)
at Microsoft.Phone.TaskModel.Interop.Task.FireOnPause(UInt32 reason)
I didnt modify the App.xaml:
<Application.ApplicationLifetimeObjects> <shell:PhoneApplicationService Launching="Application_Launching" Closing="Application_Closing" Activated="Application_Activated" Deactivated="Application_Deactivated"/> </Application.ApplicationLifetimeObjects>
After the defined method "Application_Deactivated" has been called, the application crashes.
(There isnt any code in that method who could cause anything)