daniel-luberda / DLToolkit.Forms.Controls

Xamarin.Forms Custom Controls
Apache License 2.0
393 stars 182 forks source link

InfiniteScroll, binding FlowTotalRecords doesn't work #301

Open mleone20 opened 1 year ago

mleone20 commented 1 year ago

Binding the FlowTotalRecords doesn't trigger the first FlowLoadingCommand.

This works:

        <flv:FlowListView x:Name="flowListView" 
                    FlowColumnCount="2" 
                    SeparatorVisibility="None" HasUnevenRows="true"
                    FlowColumnMinWidth="160"
                    FlowItemsSource="{Binding Items}" 
                    FlowIsLoadingInfinite="{Binding IsBusy}"
                    FlowTotalRecords="50"
                    FlowLoadingCommand="{Binding LoadingCommand}" 
                    FlowIsLoadingInfiniteEnabled="true">

and this not:

        <flv:FlowListView x:Name="flowListView" 
                    FlowColumnCount="2" 
                    SeparatorVisibility="None" HasUnevenRows="true"
                    FlowColumnMinWidth="160"
                    FlowItemsSource="{Binding Items}" 
                    FlowIsLoadingInfinite="{Binding IsBusy}"
                    FlowTotalRecords="{Binding TotalRecords}"
                    FlowLoadingCommand="{Binding LoadingCommand}" 
                    FlowIsLoadingInfiniteEnabled="true">

The binding context:

        public int TotalRecords { get => totalRecords; set => SetProperty<int>(ref totalRecords, value); }
        private int totalRecords = 50;