Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 81910

Problem with Slider inside CarrouselPage

$
0
0

Hello,

I have a Slider inside a CarouselPage.

I'm having an issue, more on iOS, that I cant slide it properly.

Every time I try to slide the slider, if I don't hit the very little center of the circle in Slider it gets the "Scroll Event" of the CarouselPage and Scrolls the page itself.

I tried to increase the area of Slider with a Custom Renderer like this:

    public class CustomSliderRenderer : SliderRenderer
    {
        public override bool PointInside(CoreGraphics.CGPoint point, UIEvent uievent)
        {
            var margin = -10f;
            var area = this.Bounds;
            var expandedArea = area.Inset(margin, margin);
            return expandedArea.Contains(point);
        }
    }

But this did not worked, even with margin = 10000f the CarouselPage touch has priority.

Is there any way to workaround this?

Or some way to disable the CarouselPage scroll in some section of screen?


Viewing all articles
Browse latest Browse all 81910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>