private async Task <Boolean> InitBiens() { using (ServiceAgence.AgenceClient client = new ServiceAgence.AgenceClient()) { client.Open(); ServiceAgence.ResultatListeBiensImmobiliers res = await client.LireListeBiensImmobiliersAsync(filtre, null, null); this.ListeBienImmo.Clear(); for (int i = 0; i < res.Liste.List.Count; i++) { this.ListeBienImmo.Add(res.Liste.List.ElementAt(i)); } //this.ListeBienImmo = res.Liste.List; for (int i = 0; i < ListeBienImmo.Count; i++) { Console.WriteLine("id :" + ListeBienImmo.ElementAt(i).Id); } client.Close(); loader.Visibility = System.Windows.Visibility.Hidden; loader.Stop(); //Console.WriteLine("load !"); } return(true); }