private void LoadData(){ ServiceClient proxy = new ServiceClient(); IsBusy = true; proxy.GetCustomersCompleted += (s, e)=> { ObservableCollection<CustomerModel> CustList = new ObservableCollection<CustomerModel>(); foreach(var item in CustList) { CustList.Add(new CustomerModel() { FirstName = item.firstname, LastName = item.lastname, //and so on ... }); } IsBusy = false; }; proxy.GetCustomersAsync(); proxy.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)