HomeiOS DevelopmentHow do I fade out the contents of a scrollview in Xamarin...

How do I fade out the contents of a scrollview in Xamarin Types iOS? Fade out high and backside when there’s an extra content material


There’s a half answer right here. However this solely fades out the underside layer not the highest layer when there’s an extra content material. I wish to fade out each high and backside layer when there’s 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

Most Popular

Recent Comments