/// <summary> /// Handles the Click event on the setting app bar button, this displays the /// <see cref="SettingsDialog"/> used to manage the Dropbox connection. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="RoutedEventArgs"/> instance containing the event data.</param> private async void SettingsClick(object sender, RoutedEventArgs args) { var settings = new SettingsDialog(); var result = await settings.ShowAsync(); if (result == ContentDialogResult.Primary) { var app = (App)Application.Current; if (string.IsNullOrEmpty(app.AccessToken)) { DropboxOAuth.AuthorizeAndContinue(); } else { app.AccessToken = string.Empty; this.NotConnected.Visibility = Visibility.Visible; this.RefreshButton.IsEnabled = false; } } }