private void UserControl_Loaded(object sender, RoutedEventArgs e) { if (loadtimes == 0) { HTTP.Get(ServicePath.GalleryAshx, new Action <string>((str) => { ObservableCollection <GalleryModel> list = Newtonsoft.Json.JsonConvert.DeserializeObject <ObservableCollection <GalleryModel> >(str); Dispatcher.Invoke(new Action(() => { foreach (var item in list) { HTTP.DownImage(item.Name, item.Image, new Action <string>((path) => { item.Image = path; })); item.Image = ""; ShowList.Add(item); } })); }), new Action <Exception>((ex) => { })); } loadtimes++; }