private void OnGetOneDayWallpapersProgressEvent(ProgressEventArgs progressEventArgs) { if (GetOneDayWallpapersProgressEvent != null) { GetOneDayWallpapersProgressEvent.Invoke(this, progressEventArgs); } }
private async void OnOneDayWallpapersProgressEvent(object sender, ProgressEventArgs e) { await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (e.IsException) { info.Text = "获取图片异常:" + e.ExceptionInfo; } else { progress.Value = e.ProgressValue; if (e.Complete) { tips.Visibility = Visibility.Collapsed; pictureList.ItemsSource = e.Pictures; Debug.WriteLine("e.Pictures.Count:" + e.Pictures.Count); } } }); }