码迷,mamicode.com
首页 > 其他好文 > 详细

WPF控件模拟双击事件

时间:2014-06-27 16:13:15      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   color   cti   

          Action a = () =>
            {
                i += 1;
                var timer = new System.Timers.Timer(800) { Interval = 600 };

               timer.Elapsed += (sender, e) =>
                {
                   timer.Enabled = false;
                    i = 0;
                };
                timer.Enabled = true;
                if (i % 2 == 0)
                {
                    i=0;
                    timer.Enabled = false;
                  //你的代码
                }
            };
            name_headChatWin.Dispatcher.Invoke(a);                                    

 

WPF控件模拟双击事件,布布扣,bubuko.com

WPF控件模拟双击事件

标签:style   class   blog   code   color   cti   

原文地址:http://www.cnblogs.com/gaobing/p/3810147.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!