/// <summary> /// Установить значение фильмов /// </summary> /// <param name="value">Тип фильма</param> public void SetFilms(FilmType?value) { Films = value == null ? new BindableCollection <Film>() : new BindableCollection <Film>(DbMethods.GetDbCollection <Film>() .FindAll(film => film.FilmType == value).OrderBy(f => f.Name)) { new Film { Name = NewFilmName, FilmType = SelectedFilmType ?? FilmType.Видео } }; SelectedFilm = null; NotifyOfPropertyChange(() => Films); NotifyOfPropertyChange(() => CanCancelFilmTypeSelection); NotifyOfPropertyChange(() => FilmsVisibility); }
protected override void OnInitialize() { Films = new BindableCollection <Film>(DbMethods.GetDbCollection <Film>()); base.OnInitialize(); }