xamarin/Xamarin.Forms

[Feedback, UWP] Swipe Gesture Recognizer breaks scrolling on ScrollView

オープン

#4,552 opened on 2018/11/27

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
e/5 :clock5:feedback-tickethelp wantedinactivep/UWPt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

When SwipeGestureRecognizers are added to a stacklayout in a scrollview the scrollview will no longer scroll with touch.

The only way to see this behavior is to use the simulator or a device where you can actually touch the screen.

<ScrollView BackgroundColor="Yellow">
	<StackLayout Orientation="Vertical" BackgroundColor="Purple">
		<StackLayout.GestureRecognizers>
			<SwipeGestureRecognizer Direction="Left" Swiped="OnTestLayoutLeftSwiped" />
			<SwipeGestureRecognizer Direction="Right" Swiped="OnTestLayoutRightSwiped" />
		</StackLayout.GestureRecognizers>

		<Label Text="Swipe me" x:Name="lblSwiped" WidthRequest="200" HeightRequest="300" BackgroundColor="Green"></Label>
		<Label Text="Swipe 1" WidthRequest="200" HeightRequest="300" BackgroundColor="Blue"></Label>
		<Label Text="Swipe 2" WidthRequest="200" HeightRequest="300" BackgroundColor="Aqua"></Label>
		<Label Text="Swipe 3" WidthRequest="200" HeightRequest="300" BackgroundColor="Yellow"></Label>
	</StackLayout>
</ScrollView>
private void OnTestLayoutLeftSwiped(object sender, SwipedEventArgs e)
{
    lblSwiped.Text = "Swiped Left";
}

private void OnTestLayoutRightSwiped(object sender, SwipedEventArgs e)
{
    lblSwiped.Text = "Swiped Right";
}

View on Developer Community To find diagnostic information, see the original linked feedback ticket.

Source

736026

コントリビューターガイド