我正在使用James Montemagno(https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout)的PullToRefreshLayout,并且在iOS平台上,当我的页面加载和IsRefreshing属性设置为false时,页面顶部被切除。
我该如何解决?
那是我的XAML布局?
<pull:PullToRefreshLayout
x:Name="RefreshLayout"
IsPullToRefreshEnabled="True"
RefreshCommand="{Binding RecarregarCommand}"
IsRefreshing="{Binding IsBusy}">
<customViews:AlwaysScrollView x:Name="Scroll"
VerticalOptions="FillAndExpand">
<StackLayout Spacing="{StaticResource CardSpacing}"
Padding="0,30,0,16"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<Image x:Name="ItemFoto"
Source="{Binding UrlLogoClinica}"
Aspect="AspectFit"
MinimumWidthRequest="150"
HeightRequest="150"
VerticalOptions="Start"
HorizontalOptions="FillAndExpand"
Margin="16,0,16,16">
<Image.GestureRecognizers>
<TapGestureRecognizer Command="{Binding DetalheClinicaCommand}"/>
</Image.GestureRecognizers>
</Image>
<customViews:TableViewSemScroll
Intent="Menu"
HeightRequest="100"
HasUnevenRows="True"
Margin="0"
VerticalOptions="Start"
HorizontalOptions="FillAndExpand">
<TableRoot>
<TableSection Title="{x:Static resx:AppResources.TituloPaciente}">
<TextCell Text="{Binding Paciente.Nome}"
StyleId="disclosure"
Command="{Binding EditarCommand}"/>
</TableSection>
</TableRoot>
</customViews:TableViewSemScroll>
<customViews:CardView IsVisible="{Binding IsListaAgendaVisivel}"
Margin="0">
<StackLayout Spacing="0">
<customViews:LabelSection Text="{x:Static resx:AppResources.TituloAgenda}"/>
<customViews:HeaderDivider/>
<customViews:ListViewSemScroll
x:Name="ListAgenda"
ItemsSource="{Binding ListaAgenda}"
SeparatorColor="{StaticResource ListSeparator}"
RowHeight="44">
<customViews:ListViewSemScroll.Behaviors>
<behaviors:EventToCommandBehavior
EventName="ItemTapped"
Command="{Binding ItemSelectCommand}"
EventArgsConverter="{StaticResource ItemToObject}"/>
</customViews:ListViewSemScroll.Behaviors>
<customViews:ListViewSemScroll.ItemTemplate>
<DataTemplate>
<ImageCell
ImageSource="{Binding NomeIcone}"
Text="{Binding Nome}"
StyleId="disclosure"/>
</DataTemplate>
</customViews:ListViewSemScroll.ItemTemplate>
</customViews:ListViewSemScroll>
<customViews:FooterDivider/>
</StackLayout>
</customViews:CardView>
//Other listviews
</StackLayout>
</customViews:AlwaysScrollView>
</pull:PullToRefreshLayout>
如您所见,我的页面中还有很多ListView,还有TableView,但同时禁用了TableView和ListViews滚动。