0

As the question says, I need to enable the content page swiping which is a child of a tabbed page. But the siping for the tabbed page should be disabled.

I have gone through the various post but by using them I can able disable the swiping for the tabbed page but I am not able to use the GestureRecognizer events in children views.

I tried this: Xamarin Forms Disable swipe between pages in TabbedPage

Can anyone help me with this, please?

sahithi
  • 1,039
  • 2
  • 14
  • 37
  • Can you give some code ? Like what are your children views ? If I understood, what you are trying to achieve is some kind of carousel within a child tabbed page ? – Umar3x Mar 29 '19 at 16:25
  • Yes, exactly that is what I am looking for @Umar3x – sahithi Mar 30 '19 at 03:44

1 Answers1

0

So there seems to be a bug or if not a bug a specific behavior that when you disable page swiping for the tabbed page, gesture recognizer won't work.

If what you want to achieve is a carousel inside a child tabbed page you can use CarouselView from AlexRainMan which works great even when IsSwipePagingEnabled is set to False.

https://github.com/alexrainman/CarouselView

I have prepared a sample for you that is working on Android, did not test it on iOS :

https://github.com/vincentcastagna/TabbedPageWithCarouselView

The carousel is implemented in the AboutPage (and it is minimalist)

Umar3x
  • 1,084
  • 10
  • 22
  • Thank you very much for the help, I will apply this :-) – sahithi Apr 01 '19 at 03:35
  • This is what I am looking forward for Thank you. Can you please also tell me is there any scrolling events because I need have some functionality when user swipes the page. – sahithi Apr 01 '19 at 07:17
  • 1
    Yes there is. Check the github ;) `Scrolled: called when the carousel is transitioning from one page to another (e.NewValue = scrolling percent completed, e.Direction = scrolling direction (Left, Right, Up, Down)).` – Umar3x Apr 01 '19 at 09:09