private void OnCompassCalibrate(object sender, CalibrationEventArgs e) { // Relay the event. Deployment.Current.Dispatcher.BeginInvoke(new Action(() => { if (CompassCalibrationRequested != null) { CompassCalibrationRequested(this, EventArgs.Empty); } })); }