New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MessageBox.Show from ViewModel? #12
Comments
Basically you are right, but the samples are intended to show Rx in the most simple way possible. |
Definitely. One good MVVM-correct way to show message boxes is through the UserError framework, here's the docs on how that works |
Thanks. That's great info on errors. What I was doing when I looked up this example was a command to open a file. It goes like this:
I need to find the RxUI way of doing the last step but otherwise I hope I'm on the right track. This is probably not the right place to post this ... |
Observable.FromEventPattern<STUFF,OTHERSTUFF>(x => OnOpenFile += x)
.InvokeCommand(this, x => x.ViewModel.FileChosen); FileChosen.Subscribe(x => {
var file = (string)x;
// Do a Thing
}); |
Hi,
Trying to get my head around using RxUI. In
ReactiveUI.Samples / ReactiveUI.Samples.Commands / RxUI / MainVIewModel.cs
There's a call to MessageBox.Show(...). That seems wrong. Shouldn't that be in the view?
The text was updated successfully, but these errors were encountered: