private void OnNotifyRefresh(KeyValuePair<string, List<IStorageFile>> item) { NotifyRefreshEventArgs e = new NotifyRefreshEventArgs(item); this.notifyrefresh(this, e); }
private void Albums_notifyrefresh(object sender, NotifyRefreshEventArgs e) { #pragma warning disable CS4014 // 由于此调用不会等待,因此在调用完成前将继续执行当前方法 this.Dispatcher.RunAsync(CoreDispatcherPriority.High, () => { if (e != null) { Albums.RefreshtoList(e.item); } else { ((Window.Current.Content as Frame).Content as MainPage).FinishCreate(); Albums.notifyrefresh -= Albums_notifyrefresh; } }); #pragma warning restore CS4014 // 由于此调用不会等待,因此在调用完成前将继续执行当前方法 }