【发布时间】:2016-01-21 23:07:03
【问题描述】:
请帮忙。 我把这个结构放在主 ViewModel 的任何方法中
Thread thread = new Thread(() =>
{
_visualizerService.ShowDialog(new PurchaseWindowViewModel());
});
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
我在 PurchaseWindowViewModel.xaml.cs 中有异常
“System.InvalidOperationException”类型的异常发生在 PresentationFramework.dll 但未在用户代码中处理。额外的 信息:无法访问对象 Freezable "Catel.Windows.Media.Effects.GrayscaleEffect"
通过线程,因为它不能被冻结。
【问题讨论】: