xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

[Bug] Cannot able to restrict the horizontal bouncing in Xamarin.Forms.iOS #5897

Open BalasubramaniSundaram opened 5 years ago

BalasubramaniSundaram commented 5 years ago

Description

Hi Team We at Syncfusion develop data visualization controls for Xamarin and we have more than 90 controls spread across all platforms of Xamarin. Please refer the below link for a description about us. UserGuide: https://help.syncfusion.com/xamarin/sfdatagrid/overview FeatureTour: https://www.syncfusion.com/products/xamarin UserGuide:https://help.syncfusion.com/xamarin/sflistview/getting-started

Issue

Steps to Reproduce

  1. Run the attached sample
  2. Just try to do bounce in horizontal
  3. I have set followed properties in the Renderer class in iOS platforms. ScrollViewRenderer.Bounce = true; ScrollViewRenderer.AlwaysHorizontalBounce= false; ScrollViewRenderer.AlwaysVerticalBounce = true; ScrollViewRenderer.directionLockedEnable = true;
  4. It will bounce in horizontall

Expected Behavior

Horizontal bouncing shouldn't to happen

Actual Behavior

Horizontal bouncing still happening after we restricted

Basic Information

Screenshots

Screen Shot 2019-04-12 at 11 55 32 AM

Reproduction Link

horizontalBouncing Video.zip

XAMARINIOS_2777.zip

GalaxiaGuy commented 5 years ago

I believe that is intended behavior on iOS.

AlwaysBounceHorizontal does not control whether bouncing can happen, but whether bouncing must happen. It is used to force bouncing to occur even when the content is smaller than than the scrollview and has no effect otherwise.

https://developer.apple.com/documentation/uikit/uiscrollview/1619393-alwaysbouncehorizontal

If this property is set to true and bounces is true, horizontal dragging is allowed even if the content is smaller than the bounds of the scroll view. The default value is false.

BalasubramaniSundaram commented 5 years ago

Hi @GalaxiaGuy, Thanks for the documentation reference, In the documentation, they have mentioned that to enable force bouncing in a horizontal direction, we need to set the value of AlwaysBounceHorizontal and Bounces value as 'True'. However, our horizontal content exceeds the actual screen size which enables the scrolling in a horizontal direction. Thus without forcing, the content bounces in a horizontal direction when reaching the end. Is there any way to disable this behavior without disabling the bounce in the vertical direction?

Regards, Balasubramani Sundaram.

BalasubramaniSundaram commented 5 years ago

Hi @samhouts, Any Update on this ?

Regards Balasubramani Sundaram.

BalasubramaniSundaram commented 5 years ago

Hi Team, Any Update?

Regards, @BalasubramaniSundaram

BalasubramaniSundaram commented 5 years ago

Hi Team, Any Update.

Regards, @BalasubramaniSundaram

vimal1994 commented 5 years ago

Hi @samhouts ,

Could you update on this ?

samhouts commented 5 years ago

This is on the backlog. Given our current set of priorities, we expect to begin working on this in early November. Thank you for your patience!