Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Created July 10, 2020 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfversluis/b4768a10d43b374713b26351cfe5c634 to your computer and use it in GitHub Desktop.
Save jfversluis/b4768a10d43b374713b26351cfe5c634 to your computer and use it in GitHub Desktop.
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