【发布时间】:2019-05-09 09:53:42
【问题描述】:
我正在使用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>
当我向下滚动页面时,拉动刷新正在工作。但页面没有滚动。我想让页面向下滚动并在滚动完成后触发拉动刷新。该怎么做?
【问题讨论】:
-
在滚动视图和堆栈布局中设置
HorizontalOptions="FillAndExpand"和VerticalOptions="FillAndExpand"是否有帮助? -
当我在这里使用滚动视图时,底部的项目不会显示在视图中。我会用stacklayout试试。 @JulioE.RodriguezCabañas
-
我以为您已经在滚动视图中使用了堆栈布局?我肯定会这样做,因为样本就是这样做的。
-
其实他们不支持stacklayouts,只支持listviews和scrollviews。
-
当我在滚动视图中使用 stacklayout 时,底部项目不显示。当我删除滚动视图时,页面滚动正常,因为它包含一个表格视图。那么问题是滚动时触发刷新。我无法滚动。
标签: xamarin xamarin.forms pull-to-refresh