ScrollView not working on touch in Xamarin.UWP

2019-06-13 17:24发布

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

0条回答
登录 后发表回答