XamarinLife
Published in

XamarinLife

Stop Bounce Effect in ScrollView — Xamarin Forms

Stop Bounce Effect in Scroll View — Xamarin Life

Custom ScrollView

public class CustomScrollView : ScrollView
{
public CustomScrollView()
{
}
}

CustomScrollViewRenderer

[assembly: ExportRenderer(typeof(CustomScrollView), typeof(CustomScrollViewRenderer))]
namespace BounceEffect.iOS
{
public class CustomScrollViewRenderer : ScrollViewRenderer
{
public CustomScrollViewRenderer()
{
}
protected override void OnElementChanged(VisualElementChangedEventArgs e)
{
base.OnElementChanged(e);
Bounces = false;
}
}
}

XML

xmlns:local=”clr-namespace:BounceEffect”
<local:CustomScrollView ><! — your content goes here — ></local:CustomScrollView/>
Stop Bouncing effect in Xamarin Forms Scroll View — Xamarin Life

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
TharsanP

Professional Android native Developer and Cross paltform mobile app developer using Xamarin Forms. <3 Mobile Development