private async void RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { using (var deferral = args.GetDeferral()) { await FetchAsync(4); } }
private async void OnRefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { using (var complion = args.GetDeferral()) { await MainViewModel.Current.FetchCosts(); } }
public async void RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { using (var RefreshCompletionDeferral = args.GetDeferral()) { await Refresh(); } }
private async void RefreshContainer_RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs e) { Deferral deferral = e.GetDeferral(); await ViewModel.RefreshAsync(); deferral.Complete(); }
public async void PullToRefresh_ListView(object sender, RefreshRequestedEventArgs e) { var deferral = e.GetDeferral(); await BuildList(); deferral.Complete(); }
public async void PullToRefresh_ListView(object sender, RefreshRequestedEventArgs e) { var deferral = e.GetDeferral(); await GetMessageGroups(Shell.Instance.ViewModel.CurrentUser.Username); deferral.Complete(); }
private async void RefreshContainer_RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { using (var deferral = args.GetDeferral()) { var contactservices = new ContactServices(); var contacts = (await contactservices.ListAsync()).ToList(); ContactListView.ItemsSource = contacts; } }
private async void RefreshContainer_OnRefreshRequested( RefreshContainer sender, RefreshRequestedEventArgs args) { using (var refrechCompletionDeferral = args.GetDeferral()) { var contactService = new ContactService(); var contactList = (await contactService.ListAsync()).ToList(); MasterListView.ItemsSource = contactList; } }
void OnRefresh(object sender, RefreshRequestedEventArgs args) { CompleteRefresh(); _refreshCompletionDeferral = args.GetDeferral(); Element.SetValueFromRenderer(RefreshView.IsRefreshingProperty, true); if (Element?.Command?.CanExecute(Element?.CommandParameter) ?? false) { Element.Command.Execute(Element?.CommandParameter); } }
void OnRefresh(object sender, RefreshRequestedEventArgs args) { CompleteRefresh(); _refreshCompletionDeferral = args.GetDeferral(); if (VirtualView != null) { VirtualView.IsRefreshing = true; } }
private static async void RefreshContainerOnRefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { if (GetItemsSource(sender) is ISupportRefresh source) { using var def = args.GetDeferral(); await source.Refresh(); def.Complete(); } }
private async void OnRefreshContainerRefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs e) { Deferral deferral = e.GetDeferral(); if (ViewModel.RootFolder != null) { await ViewModel.RootFolder.FillAsync(); } deferral.Complete(); }
private void RefreshController_RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { using (var RefreshCompletionDeferral = args.GetDeferral()) { // Do some async operation to refresh the content GridView.ItemsSource = null; GridView.ItemsSource = ItemManager.GetItemList(Globals.uid); RefreshCompletionDeferral.Complete(); RefreshCompletionDeferral.Dispose(); } }
private void RefreshContainer_RefreshRequested(object sender, RefreshRequestedEventArgs args) { using (var deferral = args.GetDeferral()) { RefreshRequested?.Invoke(this, EventArgs.Empty); if (RefreshCommand != null && RefreshCommand.CanExecute(null)) { RefreshCommand.Execute(null); } } }
private async void OnRefreshRequested(object sender, RefreshRequestedEventArgs e) { if (!Allowed) { Toast.ShowError("不允许连接wifi,请确认已开启wifi,重新打开应用"); return; } await firstAdapter.ScanAsync(); LoadingVisibility = Visibility.Visible; await DisplayNetworkReport(firstAdapter.NetworkReport); e?.GetDeferral(); }
public async void PullToRefresh_ListView(object sender, RefreshRequestedEventArgs e) { var deferral = e.GetDeferral(); try { await SetTrophyDetailList(); } catch (Exception) { // TODO: Add error checker here too? } deferral.Complete(); }
private async void RefreshContainer_RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { // Respond to a request by performing a refresh and using the deferral object. using (var RefreshCompletionDeferral = args.GetDeferral()) { // Do some async operation to refresh the content await MainPageViewModel.Refresh(); // The 'using' statement ensures the deferral is marked as complete. // Otherwise, you'd call // RefreshCompletionDeferral.Complete(); // RefreshCompletionDeferral.Dispose(); } }
private async void OnRefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { if (!_upToDate) { _upToDate = true; var deferral = args.GetDeferral(); await Task.Delay(1000); Cases.Insert(0, _caseToAdd); deferral.Complete(); } }
public Deferral GetDeferral(RefreshRequestedEventArgs e) => e.GetDeferral();
void OnRefresh(object sender, RefreshRequestedEventArgs args) { CompleteRefresh(); _refreshCompletionDeferral = args.GetDeferral(); Element.SetValueFromRenderer(RefreshView.IsRefreshingProperty, true); }
private void rc2_RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { this.RefreshCompletionDeferral2 = args.GetDeferral(); //Do some work to show new content! timer2.Start(); }
private void MemoryViewer_RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { //Do some work to show new Content! Once the work is done, call RefreshCompletionDeferral.Complete() this.RefreshCompletionDeferralForMemory = args.GetDeferral(); }
private void rc_RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args) { this.RefreshCompletionDeferral = args.GetDeferral(); timer.Start(); }