Xamarin 表单滚动不适用于表视图中的 PullToRefreshLayout

Sandulasanth-7

我正在使用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>

当我向下滚动页面时,刷新的拉动正在工作。但页面没有滚动。我想让页面向下滚动并在滚动完成后触发刷新。怎么做?

Sandulasanth-7

我重新安排了我的 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>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章