摘要: 早上在某WPF群里吹水,突然有人问了一个问题,他想利用一个计时器Timer类,实时更新界面上的控件内容,但是一直遇到抛出异常:System.InvalidOperationException{"调用线程无法访问此对象,因为另一个线程拥有该对象。"} 。于是我就拖了两个Label控件,在WPF上测试起来,代码如下: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Windows; 6 using System 阅读全文
posted @ 2012-03-06 13:09 zhchbin 阅读(29732) 评论(8) 推荐(4) 编辑