How to swipe from bottom up to view the next photo/video in a list of photos/videos

Wei Wen 1,126 Reputation points
2021-10-18T02:04:25.33+00:00

I have a list of photos and short videos I want them to appear one page at a time. If the user swipes from bottom up, the next video/image will appear and occupy the entire page. Currently, I implemented this as a scrollview with each video/photo in a content view. But this does not achieve what I want.

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

Answer accepted by question author
  1. JarvanZhang 23,971 Reputation points
    2021-10-19T02:03:58.357+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Try using CarouselView to display the photos/videos. If you want to swipe form bottom to top and swipe an item at on time, please use as LinearItemsLayout as CarouselView.ItemsLayout and set SnapPointsType to MandatorySingle.

    Here is the sample code, you could refer to it.

       <CarouselView>  
           <CarouselView.ItemsLayout>  
               <LinearItemsLayout Orientation="Vertical" SnapPointsType="MandatorySingle"/>  
           </CarouselView.ItemsLayout>  
           <CarouselView.ItemTemplate>  
               <DataTemplate>  
                   <!--the content-->  
               </DataTemplate>  
           </CarouselView.ItemTemplate>  
       </CarouselView>  
    

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


0 additional answers

Sort by: Most helpful

Your answer

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