anand
anand

Reputation: 1459

Is SwipeToRefresh layout is available in xamarin forms?

I need to use swipe to refresh layout in my xamarin forms app.
I know how to use pull to refresh.
But, I am not getting swipe to refresh layout control in xamarin forms.

How I can use swipe to refresh layout in xamarin forms?

Upvotes: 0

Views: 219

Answers (1)

manoj
manoj

Reputation: 150

Yes, Its available in XamarinForms.

<ListView ItemsSource="{Binding MyItems}" 
    RefreshCommand="{Binding RefreshCommand}"
    IsRefreshing="True"
    IsPullToRefreshEnabled="True">

For this you need to follow MVVM pattern because RefreshCommand not event. So RefreshCommand binding with your MVVM command and you can easily refresh your list.

Upvotes: 1

Related Questions