You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to cancel a dialog created using DialogCoordinator.Instance.ShowMessageAsync() without getting an exception with the message "The calling thread cannot access this object because a different thread owns it." I've tried with and without using Dispatcher.Invoke.
What steps will reproduce this issue?
Create an instance of MetroDialogSettings with CancellationToken assigned
Call ShowMessageAsync using the DialogCoordinator and passing in the dialog settings
Cancel the token
Exception is thrown
Expected outcome
Dialog should be closed without crashing the application and possibly throw OperationCanceledException on the invoking call stack (I don't really care whether the exception is thrown or not).
I have the exact same issue, it is still present in the latest 2.x prerelease build
It would be great if it could be fixed, very handy for easily closing a dialog on a timeout or when it's no longer relevant due to a task cancellation
Description
I am unable to cancel a dialog created using DialogCoordinator.Instance.ShowMessageAsync() without getting an exception with the message "The calling thread cannot access this object because a different thread owns it." I've tried with and without using Dispatcher.Invoke.
What steps will reproduce this issue?
Expected outcome
Dialog should be closed without crashing the application and possibly throw OperationCanceledException on the invoking call stack (I don't really care whether the exception is thrown or not).
Repo
https://github.com/Retik/ShowMessageBugExample
Environment
The text was updated successfully, but these errors were encountered: