xamarin - Xamarin 表单滚动不适用于表视图中的 PullToRefreshLayout
问题描述
我正在使用https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout在 XAML 中实现表视图。这是结构
<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>
推荐阅读
- xslt-1.0 - 具有不同输入的重复节点
- android - 更新应用程序使用旧版本应用程序中使用的 FFMpeg 版本
- javascript - 当我在表单中按下回车键时如何触发另一个按钮
- unit-testing - 将来自多个项目的单元测试组合到一个用于 Azure DevOps Pipeline 的 Docker 映像中
- ruby-on-rails - 没有路线匹配 [POST] "users/sign_up"
- r - 当 x 未知且 y 已知时,如何求解方程 y=ax^2+bx+c
- sql-server - SQL Server 2012 - 根据状态变化计算状态时间
- powerbi - Power BI 仪表板 - 通过单击按钮显示筛选的数据
- javascript - Blazor,如何将事件目标传递给 JavaScript
- firebase - 带有 Google Analytics 触发器的 Cloud Functions 并不总是启动