Closed deakjahn closed 6 years ago
Is this property change handler not effective?
protected override void OnElementPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); if (e.PropertyName == "ItemsSource") { _adapter.Items = Element.ItemsSource; } //If the element IsRefreshing property is changing. else if (e.PropertyName == "IsRefreshing") { //Indicate whether the control is refreshing. _pullToRefresh.Refreshing = Element.IsRefreshing; } //If the element PullToRefresh property is changing. else if (e.PropertyName == "IsPullToRefreshEnabled") { //Indicate whether pull to refresh is enabled. _pullToRefresh.Enabled = Element.IsPullToRefreshEnabled; } }
No, it isn't. The refreshing icon will appear, anyway. Even the workaround isn't perfect, it doesn't disable the animation, just exits it immediately.
My suspicion is the you simply can't solve this with a SwipeRefreshLayout
. Once you decide to use that, there will be visible reaction to the swiping gesture, no matter what.
New version
Pull-to-refresh is always active because, although the value of
IsPullToRefreshEnabled
is passed to_pullToRefresh.Enabled
, it's never actually checked later (neither by the gridview nor bySwipeRefreshLayout
, apparently). A fix: