等待标记动画不会在 Xamarin.Forms 上消失

the wait mark animation does not disappear on Xamarin.Forms

我正在使用 Xamarin 进行开发。 当我滚动 CollectionView 时,等待标记动画即使在滚动完成后也不会消失。 请告诉我如何删除它。

        <StackLayout Spacing="20" Padding="15" >
            <RefreshView x:DataType="local:ItemDetailViewModel" 
                 IsRefreshing="{Binding IsBusy, Mode=TwoWay}">
                <CollectionView x:Name="ItemsListView" 
                 ItemsSource="{Binding EventItems}" SelectionMode="None">

...template...

                </CollectionView>
            </RefreshView>

        </StackLayout>

当您完成刷新命令中的任务时,您需要将 IsBusy 设置为 False。

<RefreshView IsRefreshing="{Binding IsBusy}"
             Command="{Binding RefreshCommand}">
    
</RefreshView>
public ICommand RefreshCommand { get; }
public ItemsViewModel()
{
    Title = "Browse";
    Items = new ObservableCollection();
    RefreshCommand = new Command(ExecuteRefreshCommand);
}

bool _isBusy;
public bool IsBusy
{
    get => _isBusy;
    set
    {
        _isBusy = value;
        OnPropertyChanged(nameof(IsBusy));
    }
}

void ExecuteRefreshCommand()
{
     // DO your task then
    // Stop refreshing
    IsBusy = false;
}