private void BindCollectionToView() { if (FavoritesController.IsDataLoaded()) { ListQuotes.ItemsSource = FavoritesController.FavoritesCollection; } if (FavoritesController.HasItems()) { NoContentView.Visibility = Visibility.Collapsed; ListQuotes.Visibility = Visibility.Visible; } }
private void BindCollectionToFavoritesView() { if (FavoritesController.IsDataLoaded() && FavoritesController.FavoritesCollection.Count > 0) { ListView favoritesList = Controller.FindChildControl <ListView>(FavoritesSection, "FavoritesQuotes") as ListView; StackPanel NoContentFavoritesView = Controller.FindChildControl <StackPanel>(FavoritesSection, "NoContentFavoritesView") as StackPanel; favoritesList.ItemsSource = FavoritesController.FavoritesCollection; favoritesList.Visibility = Visibility.Visible; NoContentFavoritesView.Visibility = Visibility.Collapsed; } }