首页 > Windows开发 > 详细

Winform与WPF异步修改控件属性

时间:2017-03-13 19:04:12      阅读:179      评论:0      收藏:0      [点我收藏+]
Winform方式:
    if (this.InvokeRequired)
            {
                this.Invoke(
                    new Action (
                        delegate(Form form1)
                        {
                            lblTip.Content = msg;
                        })
                    , this
                );
            }
WPF方式:
            this.Dispatcher.BeginInvoke((Action)delegate()
            {
                lblTip.Content = msg;
            });

Winform与WPF异步修改控件属性

原文:http://www.cnblogs.com/Catherine2011/p/6544288.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!