Xamarin 表单滚动无法在 table 视图中使用 PullToRefreshLayout
Xamarin forms Scrolling not working with PullToRefreshLayout in table view
我正在使用 https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout 在 XAML 中实现 table 视图。这是结构
<views:BaseContentPage.Content>
<controls:PullToRefreshLayout x:Name="PullToRefreshLayout" IsPullToRefreshEnabled="True" RefreshCommand="RefreshPatientDetailsPage" RefreshColor="{StaticResource NavigationPrimary}">
<StackLayout>
<ActivityIndicator Style="{StaticResource ActivityIndicator}" IsVisible="False"></ActivityIndicator>
<TableView x:Name="ClinicleTableView" HasUnevenRows="True">
----------------------------------------
----------------------------------------
</TableView>
</StackLayout>
</controls:PullToRefreshLayout>
</views:BaseContentPage.Content>
当我向下滚动页面时,下拉刷新功能起作用了。但页面没有滚动。我想让页面向下滚动并在滚动完成后拉动刷新。怎么做?
我重新安排了我的 XAML 代码,它按预期工作
<views:BaseContentPage.Content>
<StackLayout>
<ActivityIndicator Style="{StaticResource ActivityIndicator}" IsVisible="False"></ActivityIndicator>
<controls:PullToRefreshLayout x:Name="PullToRefreshLayout" IsPullToRefreshEnabled="True" RefreshCommand="RefreshPatientDetailsPage" RefreshColor="{StaticResource NavigationPrimary}">
<TableView x:Name="ClinicleTableView" HasUnevenRows="True">
----------------------------------------
----------------------------------------
</TableView>
</controls:PullToRefreshLayout>
</StackLayout>
</views:BaseContentPage.Content>
我正在使用 https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout 在 XAML 中实现 table 视图。这是结构
<views:BaseContentPage.Content>
<controls:PullToRefreshLayout x:Name="PullToRefreshLayout" IsPullToRefreshEnabled="True" RefreshCommand="RefreshPatientDetailsPage" RefreshColor="{StaticResource NavigationPrimary}">
<StackLayout>
<ActivityIndicator Style="{StaticResource ActivityIndicator}" IsVisible="False"></ActivityIndicator>
<TableView x:Name="ClinicleTableView" HasUnevenRows="True">
----------------------------------------
----------------------------------------
</TableView>
</StackLayout>
</controls:PullToRefreshLayout>
</views:BaseContentPage.Content>
当我向下滚动页面时,下拉刷新功能起作用了。但页面没有滚动。我想让页面向下滚动并在滚动完成后拉动刷新。怎么做?
我重新安排了我的 XAML 代码,它按预期工作
<views:BaseContentPage.Content>
<StackLayout>
<ActivityIndicator Style="{StaticResource ActivityIndicator}" IsVisible="False"></ActivityIndicator>
<controls:PullToRefreshLayout x:Name="PullToRefreshLayout" IsPullToRefreshEnabled="True" RefreshCommand="RefreshPatientDetailsPage" RefreshColor="{StaticResource NavigationPrimary}">
<TableView x:Name="ClinicleTableView" HasUnevenRows="True">
----------------------------------------
----------------------------------------
</TableView>
</controls:PullToRefreshLayout>
</StackLayout>
</views:BaseContentPage.Content>