我将AsynchronousCommand绑定到View的Button。 我需要做的是在用户点击按钮时验证窗口的一些文本框。 如果验证失败,则应向用户显示错误消息框。
我如何使用IMessageService执行此操作?
使用此代码:
var messageService = GetService<IMessageService>();
messageService.ShowError("Bitte wählen Sie einen Plan aus!");
我收到IvalidOperationException:invalidoperationexception调用线程无法访问此对象,因为另一个线程拥有它。
我该如何避免这个问题?
提前感谢您的帮助。