private void SetFilmsForSelectedDate(DateTime userSelection) { try { var dataLetter = fdViewViewByDate.GetGroupForDate(userSelection.Date); FilmsForSelectedDate.Clear(); foreach (var entry in dataLetter) { FilmsForSelectedDate.Add(entry); } (semanticZoomShowByDate.ZoomedOutView as ListViewBase).ItemsSource = fdViewViewByDate.GetFilmHeaders(dataLetter); (semanticZoomShowByDate.ZoomedOutView as ListViewBase).UpdateLayout(); GroupInfoList <object> group = dataLetter.Find(g => g.Count > 0); if (group != null) { (this.semanticZoomShowByDate.ZoomedInView as ListViewBase).ScrollIntoView(group); } } catch { } }
private void SetView(FilmView newCinemaView) { if (this.currentview == newCinemaView) { return; } this.currentview = newCinemaView; List <GroupInfoList <object> > filmDataSet = null; switch (this.currentview) { case FilmView.Current: filmDataSet = filmData.CurrentFilmGroups; break; case FilmView.Upcoming: filmDataSet = filmData.UpcomingFilmGroups; break; } if (filmDataSet != null) { GroupedFilms.Clear(); foreach (var entry in filmDataSet) { GroupedFilms.Add(entry); } (this.semanticZoom.ZoomedOutView as ListViewBase).ItemsSource = filmData.GetFilmHeaders(filmDataSet); (this.semanticZoom.ZoomedInView as ListViewBase).UpdateLayout(); GroupInfoList <object> group = filmDataSet.Find(g => g.Count > 0); if (group != null) { (this.semanticZoom.ZoomedInView as ListViewBase).ScrollIntoView(group); } } }