Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Windows Phone pull to refresh not working when ListView has few items

$
0
0

We're using Xamarin Forms 1.4.2.6359. We have a page with a ListView that has pull to refresh enabled.

For Windows Phone Silverlight 8.1, when the ListView doesn't have enough items to fit the screen (i.e., no scrolling), pull to refresh doesn't occur as it should. When there are more than enough items to fit the screen (i.e., have to scroll to get to them), then pull to refresh works fine.

On Android, pull to refresh works fine in both scenarios; haven't built an iOS project yet to know what happens there.

The code is the same. The relevant structure of the page is shown below, in case something there is throwing things off. Any ideas?

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="ZZZ">
    <Grid RowSpacing="0">
        ...
        ...
        <StackLayout VerticalOptions="FillAndExpand" Grid.Row="1" >
            <ListView
                ItemsSource="{Binding Path=Locations}"
                RowHeight="150"
                ItemSelected="OnLocationSelected"
                IsPullToRefreshEnabled="True"
                RefreshCommand="{Binding RefreshLocations}"
                IsRefreshing="{Binding IsBusy, Mode=OneWay}">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <Grid>
                              ...
                              ...
                            </Grid>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackLayout>
    </Grid>
</ContentPage>

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>