protected override void OnNavigatedTo(NavigationEventArgs e) { rootPage = MainPage.Current; var accountProvider = ((App)Application.Current).AccountProvider; RefreshButton.IsEnabled = (accountProvider.SignedInAccount != null); if (accountProvider.SignedInAccount != null) { Description.Text = $"{accountProvider.SignedInAccount.Type} user "; if (accountProvider.AadUser != null) { Description.Text += accountProvider.AadUser.DisplayableId; } notificationCache = ((App)Application.Current).NotificationProvider; notificationCache.CacheUpdated += Cache_CacheUpdated; notificationCache.Refresh(); } }
private void Button_Refresh(object sender, RoutedEventArgs e) { rootPage.NotifyUser("Updating history", NotifyType.StatusMessage); notificationCache.Refresh(); }