/// <summary> /// Handles the Click event of the Logout control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param> private async void Logout_Click(object sender, RoutedEventArgs e) { MessageDialog dialog = new MessageDialog("The application will exit.\nAre you sure you want to log out?", "Log out"); dialog.Commands.Clear(); dialog.Commands.Add(new UICommand("Yes", (s) => { OAuthToken.Delete(); App.Exit(); })); dialog.Commands.Add(new UICommand("Cancel")); dialog.DefaultCommandIndex = 1; dialog.CancelCommandIndex = 1; await dialog.ShowAsync(); }