private void ApplicationBarIconButton_Click(object sender, EventArgs e) { CTConnection.LogOut(); this.Dispatcher.BeginInvoke(() => { this.NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); }); }
// 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) { CTConnection.LogOut(); }
private void PhoneApplicationPage_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e) { CTConnection.LogOut(); }