Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 42330 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 16554 [details]
ListView.RefreshCommand obeys the CanExecute method and removes the UIRefreshControl when CanExecute is false. When this happens, the UIRefreshControl is removed which causes a warning and undesired behavior.
**Steps to Reproduce:**
1. Run the attached sample on an iOS simulator
2. Pull down to refresh on the ListView
The UIRefreshControl disappears as soon as the command starts, and a warning is outputted:
> Attempting to change the refresh control while it is not idle is strongly discouraged and probably won't work properly.
It's more desirable that the UIRefreshControl does not get removed from the UITableView. Instead, it could just not execute the command if it's CanExecute is false. We don't want the control to disappear while a RefreshCommand is executing. Instead, we may want to handle some logic in the ViewModel when CanExecute is false.
**Build Date & Platform:**
This really affects ReactiveCommand in ReactiveUI because it automatically changes the CanExecute as soon as you Execute the ReactiveCommand. This means that every time you Refresh with the ListView, the indicator disappears and the warning is outputted. However, the attached sample reproduces the same behavior in a realistic scenario without using ReactiveUI or ReactiveCommand.
This is very similar to https://bugzilla.xamarin.com/show_bug.cgi?id=32858, except it does look like the code calls EndRefreshing: https://github.com/xamarin/Xamarin.Forms/blob/2.3.0/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs#L1058
I'm experiencing the same problem with ReactiveCommand and pull to refresh in Xamarin Forms