1.当ListBox内容很多时 可使用异步动态加载友好显示
private ObservableCollection<ImageInfo> detailImages = new ObservableCollection<ImageInfo>(); public ObservableCollection<ImageInfo> DetailImages { get { return detailImages ; } set { SetProperty(ref detailImages , value); } } ...
for (int i = 0; i < 10000; i++) { DispatherHelper.Dispatcher.Invoke(DispatcherPriority.Background, (Action)(() => { DetailImages.Add(image); })); }