public MainWindowViewModel([Dependency] Couple couple) { this.Text = couple.ToString(); // 1秒おきに有効状態が切り替わるおかしなボタンにする。 this.ButtonCommand = Observable.Interval(TimeSpan.FromSeconds(1)) .Scan(default(bool), (prev, _) => !prev) .ObserveOnDispatcher() .ToReactiveCommand() .AddTo(this.disposable); // ダイアログを開くためのInteractionRequestを投げる。 this.ButtonCommand.Subscribe(() => { this.DialogRequest.Raise( new Confirmation { Title = "ダイアログ", Content = "これはダイアログです。" }, conf => System.Diagnostics.Debug.WriteLine($"Title: {conf.Title}, Content: {conf.Content}, Confirmed: {conf.Confirmed}")); }).AddTo(this.disposable); }