I working on a project(C# & WPF) where some servers are added to a listbox this way:
ObservableCollection<ServerObjects> servers;
ServerObjects so = getServers();
servers->add(so);
My problem is that this function is blocking and while items are added to my listbox, I can’t select any only after the generating is done(also the program frezes).
So any idee what should I do to make this function asynk?
Thanks.
You can do is also on RX return an IObservable subscribe on TaskScheduler and observing on Dispatcher.
-> Threadpool vs.s Creating own Thread
-> Build More Responsive Apps With The Dispatcher