错误:无效的跨线程访问. [英] Error: Invalid cross-thread access.
本文介绍了错误:无效的跨线程访问.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我正在尝试使用以下代码刷新datagrid:
Hello,
I am trying refresh datagrid using following code:
lstMaskInfo.ItemsSource = maskDetailInfo;
//错误
Invalid cross-thread access.
其中:
where:
maskDetailInfo = new List<MASK_DETAILS>();
推荐答案
您正在从最初创建线程的线程之外的线程访问网格.有关详细信息,请如何解决跨线程操作无效" [ ^ ]
You are accessing grid from a thread other than the one it was originally created on. For details How to solve "Cross thread operation not valid"[^]
这篇关于错误:无效的跨线程访问.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文