/// <summary> /// コンストラクタ /// </summary> public SearchVideoByRankingViewModel() { // 各変数の初期化 Source = new SearchVideoByRankingModel(); Videos = Source.Videos.ToSyncedSynchronizationContextCollection( video => new VideoViewModel(video), AnonymousSynchronizationContext.Current ); Genre = ComboRankGenreModel.Instance; Period = ComboRankPeriodModel.Instance; // コンボボックスにイベント割付 Genre.AddOnPropertyChanged(this, Combo_ChangeSelectedItem); Period.AddOnPropertyChanged(this, Combo_ChangeSelectedItem); // 初期表示イベント Loaded += Reload; Disposed += (sender, e) => Loaded -= Reload; }