开发者

WPF: request server in button click event

开发者 https://www.devze.com 2023-02-06 21:48 出处:网络
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 butto

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

精彩评论

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