How do I fade out the contents of a scrollview in Xamarin Varieties iOS? Fade out prime and backside when there may be an extra content material


There’s a half resolution right here. However this solely fades out the underside layer not the highest layer when there may be an extra content material. I wish to fade out each prime and backside layer when there may be an extra content material.

This tradition renderer implements it completely for android. Sadly iOS doesn’t present an api like VerticalFadingEdgeEnabled

    [assembly: ExportRenderer(typeof(FadeScrollView), typeof(FadeScrollViewRendererAndroid))]
namespace MyNameSpace
{
    public class FadeScrollViewRendererAndroid : ScrollViewRenderer
    {
        public FadeScrollViewRendererAndroid(Context context) : base(context)
        {
            this.SetFadingEdgeLength(300);
            this.VerticalFadingEdgeEnabled = true;
        }
    }
}

pattern picture

enter image description here

enter image description here

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles