Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable bounce effect on Xamarin.Forms CollectionView
using System;
using CollectionViewBounceSample.iOS;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(CollectionView), typeof(NoBounceRenderer))]
namespace CollectionViewBounceSample.iOS
{
public class NoBounceRenderer : CollectionViewRenderer
{
public NoBounceRenderer()
{
}
protected override void OnElementChanged(ElementChangedEventArgs<GroupableItemsView> e)
{
base.OnElementChanged(e);
if (e.NewElement != null)
Controller.CollectionView.Bounces = false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment