yahue 发表于 2013-1-3 15:36:49

WPF 线程间访问控件

<div id="cnblogs_post_body"><div class="cnblogs_code" style="background-color: #f5f5f5; border: #cccccc 1px solid; padding: 5px;">lisClient.Dispatcher.Invoke(new Action(() => { lisClient.Items.Add(socket.RemoteEndPoint.ToString()); }));string strmsg=(string)txtSMsg.Dispatcher.Invoke(new Func<string>(() =>{    return txtSMsg.Text; // 返回txtSMsg的text信息}));
页: [1]
查看完整版本: WPF 线程间访问控件