How to disable vertical swipe in carousel view in xamarin forms android platform?

Surbhi 1 Reputation point
2021-05-18T15:45:34.647+00:00

I have a carousel view which changes its content on every swipe whether its vertical or horizontal. I need to change the view only on horizontal swipe. Any suggestions.

Developer technologies .NET Xamarin
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JarvanZhang 23,971 Reputation points
    2021-05-19T01:40:51.143+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    I have a carousel view which changes its content on every swipe whether its vertical or horizontal.

    What view do you use to dispaly the carousel view? Do you create a custom layout with swipe gesture for this function? Xamarin.Forms provides the CarouselView control which presents data in a scrollable layout, and users can swipe to move through a collection of items in it. CarouselView only supports the single swipe: horizontal or vertical. By default, a CarouselView will display its items in a horizontal orientation.

    Here is the related doc:
    https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/carouselview/

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.