wpf多线程用户控件 [英] wpf multi threading usercontrol

查看:110
本文介绍了wpf多线程用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序在一个窗口中有4个usercontrol,当一个usercontrol中的一个enent处理器锁定其他usercontrol而我的代码完成时



i用户多线程和后台工作但不是回答请帮帮我

my program have 4 usercontrol in one window when a enent handler in one usercontrol other usercontrol is lock while my code is finish

i user multi threading and backgroundworker but not answer please help me

推荐答案

我建​​议你调查使用EventAggregator( Prism EventAggregator Sample [ ^ ])。您希望有一个控制器,它将为每个UserControl Update提供特权。因此,将EventAggregator消息发送到请求控制的控制器,然后控制器将使用另一个EventAggregator消息授予该请求。当用户控件完成时,它会向控制器发送一个EventAggregator消息,释放令牌(可以这么说)。等等。
I would suggest you investigate using an EventAggregator (Prism EventAggregator Sample[^]). You want to have a controller that will give each UserControl Update privilages. So, an EventAggregator message is is sent to the controller requesting control, then the controller will grant the request with another EventAggregator message. When a user control is finished, it sends an EventAggregator message to the controller releasing the token (so to speak). etc. etc.


请在窗口中显示两个用户控件的示例
please a sample with two usercontrol in on window


这篇关于wpf多线程用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆