Closed znelson32 closed 6 years ago
I don't get it. None of the breakpoints in the .cs are hit but the spinner image does appear. It just appears, spins, but nothing else happens.
AppDelegate contains PullToRefreshLayoutRenderer.Init();
XAML <pullToRefreshLayout:PullToRefreshLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" RefreshColor="Gray" IsPullToRefreshEnabled="True" RefreshCommand="{Binding RefreshCommand}" IsRefreshing="{Binding IsBusy}">
<pullToRefreshLayout:PullToRefreshLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" RefreshColor="Gray" IsPullToRefreshEnabled="True" RefreshCommand="{Binding RefreshCommand}" IsRefreshing="{Binding IsBusy}">
C# `private ICommand refreshCommand;
private bool isRefreshing; public bool IsBusy { get { return isRefreshing; } set { if (isRefreshing == value) return; isRefreshing = value; OnPropertyChanged("IsBusy"); } } public ICommand RefreshCommand { get { return refreshCommand ?? (refreshCommand = new Command(async () => await ExecuteRefreshCommand())); } } private async Task ExecuteRefreshCommand() { if (isRefreshing) return; IsBusy = true; ((List<object>)listView.ItemsSource).Clear(); var data = new List<object>(); data .Add(new { Name = "11111" }); data .Add(new { Name = "22222" }); data .Add(new { Name = "33333" }); listView.ItemsSource = data; isRefreshing = false; }`
Same problem here.
I had really hoped I did something wrong but I guess there’s a bug. James can you help us out?
Same here. @jamesmontemagno
You need to set IsBusy = false;
Where did those code come from?
I don't get it. None of the breakpoints in the .cs are hit but the spinner image does appear. It just appears, spins, but nothing else happens.
AppDelegate contains PullToRefreshLayoutRenderer.Init();
XAML
<pullToRefreshLayout:PullToRefreshLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" RefreshColor="Gray" IsPullToRefreshEnabled="True" RefreshCommand="{Binding RefreshCommand}" IsRefreshing="{Binding IsBusy}">
C# `private ICommand refreshCommand;