public async void OnNavigatedTo(FirstFloor.ModernUI.Windows.Navigation.NavigationEventArgs e) { try { using (var channelsService = new ChannelsService()) { ChannelLoadingProgress.IsActive = true; ChannelsListView.ItemsSource = await channelsService.GetChannels(); ChannelLoadingProgress.IsActive = false; } } catch (Exception ex) { ModernDialog.ShowMessage(ex.Message, "Error", MessageBoxButton.OK); } }
private async void RefreshChannelsButton_Click(object sender, RoutedEventArgs e) { try { using (var channelsService = new ChannelsService()) { ChannelLoadingProgress.IsActive = true; ChannelsListView.ItemsSource = await channelsService.GetChannels(); ChannelLoadingProgress.IsActive = false; } } catch (Exception ex) { ModernDialog.ShowMessage(ex.Message, "Error", MessageBoxButton.OK); } }