开发者

WPF: request server in button click event

I am sending request to WCF service in button click event, each time when user click the button I am creating separate thread to get data from WCF service. So the question is when user click the button multiple times in short period I need to crate separate thread, but before I need to put all other threads in sleeping state, what is the best practice to do it?

Thanks.开发者_Python百科


Using BackgroundWorker class it can be achieved, recently I have answered this sort of question and example code can also be used from here:

ComboBox items loaded event wpf?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜