ScrollView not working on touch in Xamarin.UWP

三世轮回 提交于 2019-12-08 12:08:36

问题


I am trying to set the AbosoluteLayout.TranslatedTo for ContentView which contains the ScrollView. In that, ScrollView not working on touch but it is working on the Mouse interaction. I added the code in C# as propertiesView.TranslateTo(propertiesView.Width / 2, 0, 400, Easing.Linear); If I didn't use the AbsoluteLayout.TranslatedTo means ScrollView working on both interactions. How to resolve the problem? Here my code

 <AbsoluteLayout x:Name="absoluteLay" VerticalOptions="FillAndExpand"
                HorizontalOptions="FillAndExpand"
                AbsoluteLayout.LayoutBounds="0,500,500,500">
  <ContentView  x:Name="propertiesView" BackgroundColor="White"
                AbsoluteLayout.LayoutBounds="0,0,500,500" >

    <ScrollView x:Name="propertiesContent" Padding="20,5,20,0"
                Grid.Row="1" Grid.ColumnSpan="2" Orientation="Vertical" 
      AbsoluteLayout.LayoutBounds="1,1,1,1">
      <StackLayout>
        <Label Text="Label1" />
        <Label Text="Label2" />
        <Label Text="Label3" />
        <Label Text="Label4" />
        <Label Text="Label5" />
        <Label Text="Label6" />
        <Label Text="Label7" />
        <Label Text="Label8" />
        <Label Text="Label9" />
        <Label Text="Label10" />
        <Label Text="Label11" />
        <Label Text="Label12" />
        <Label Text="Label13" />
        <Label Text="Label14" />
        <Label Text="Label15" />
        <Label Text="Label16" />
        <Label Text="Label17" />
        <Label Text="Label18" />
        <Label Text="Label19" />
        <Label Text="Label20" />
        <Label Text="Label21" />
        <Label Text="Label22" />
        <Label Text="Label23" />
        <Label Text="Label24" />           
      </StackLayout>
    </ScrollView>
  </ContentView>
</AbsoluteLayout>

Thanks, Santhiya A

来源:https://stackoverflow.com/questions/43708474/scrollview-not-working-on-touch-in-xamarin-uwp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!