RadListView IsPullToRefreshActive only works when pulled, does not respond to initial value

0 Answers 43 Views
ListView
Alfredo
Top achievements
Rank 1
Alfredo asked on 07 Jun 2024, 03:46 PM | edited on 07 Jun 2024, 06:14 PM

I have the following:

<telerik:RadListView              
    Margin="10"
    IsPullToRefreshActive="{Binding LoadItemsTask.IsNotCompleted}"
    IsPullToRefreshEnabled="True"  Grid.Row="2" x:Name="listView" ItemsSource="{Binding Items}" >
(...)
</telerik:RadListView>

LoadItemsTask is called at start and its value is True for a few seconds but the refresh indicator only shows up (and eventually hides) when the pull gesture is called, it does not respond to the initial value of the property.

Shouldn't this property be respected always, not just when the gesture is called?


Didi
Telerik team
commented on 10 Jun 2024, 08:51 AM

Hi Alfredo,

Could you please share whether load on demand feature is used? Also what is the OS system you are using for testing?

Alfredo
Top achievements
Rank 1
commented on 10 Jun 2024, 02:20 PM | edited

No, load on demand is not used here. If used, there's a LOAD MORE indicator which is not what I need here. Just the regular loading indicator.

This is on Android.

Didi
Telerik team
commented on 10 Jun 2024, 04:00 PM

Hi Alfredo,

The pull to refresh indicator shows when the gesture is triggered. and the duration is up to the code you have written, when you call EndRefresh(), it sets the IsPullToRefreshActive to false. Here is the EndRefresh() implementation:

    public void EndRefresh(bool isAnimated = false)
    {
        if (!isEndingRefresh)
        {
            isEndingRefresh = true;
            if (Renderer != null)
            {
                Renderer.EndRefresh(isAnimated);
                IsPullToRefreshActive = false;
            }

            isEndingRefresh = false;
        }
    }

so the behavior with the refresh indicator is expected. You can test the example here: https://docs.telerik.com/devtools/maui/controls/listview/gestures/pull-to-refresh 

Hope this answers your question.

 

 

 

No answers yet. Maybe you can help?

Tags
ListView
Asked by
Alfredo
Top achievements
Rank 1
Share this question
or