public ExportCompletedViewModel(string title, FileInfo file) { Title = title; File = file; OpenFileCommand = ReactiveCommand.Create(this.WhenAnyValue(me => me.File).Select(f => f?.Exists == true)); OpenFolderCommand = ReactiveCommand.Create(this.WhenAnyValue(me => me.File).Select(f => f?.Directory?.Exists == true)); OpenFileCommand.Subscribe(_ => Process.Start(File.FullName)); OpenFolderCommand.Subscribe(_ => Process.Start(File.DirectoryName)); Result = CloseCommand.Select(_ => (bool?)true); }