-
Notifications
You must be signed in to change notification settings - Fork 778
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
TryCloseAsync(false) problem? #857
Comments
Can you make a reproduction of this? Sounds like a bug. |
Hi KasperSK its just the project WpfApp1 Bootstrapper:
the mainViewModel
MyModalDialogViewModel
the dialogView
So when i cancel, i have the error each time |
Your button is set as IsCancel="True" and have no Command bind Hence you call to TryCloseAsync(false) tries to set the Window.DialogResult while the window is already considered as closed. I believe you can remove your call to TryCloseAsync(false) as the framework command already set the DialogResult to false which triggers the window close. |
I open a Dialog viewModel with WindowManager.
so inside the Dialog,
when i use TryCloseAsync(true) to close the Dialog, no problem,
but when i want to Cancel with TryCloseAsync(false) i have this error:
Message=DialogResult can be set only after Window is created and shown as dialog.
i am missingsomething??
the DailogViewModel is opened from the mainViewModel normlly with WindowManager
sorry for my english, hope you understant what i want to mean....
Regards
terry
The text was updated successfully, but these errors were encountered: