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?
精彩评论