Reputation: 4344
I am very new to Xamarin.Forms and I stumbled upon the github project CarouselView. I think it is almost perfect for what I want to do. I want to adapt it to show the previous and next views in the list. I don't need to worry about the content within those views. I just want to be able to modify each view so that I can see a preview of the previous and next item in the list. Kinda like the image below. Can anyone guide me in the right direction on how to achieve this?
Upvotes: 2
Views: 1736
Reputation: 119
CarouselView is now part of Xamarin Forms. They added property PeekAreaInsets which takes in thickness value. Adjusting it will result in making items partially visible. Hope this helps someone.
Upvotes: 4
Reputation: 4032
Carousel Page of Xamarin.Forms has an event so you can handle the change, this is something you can do:
CarouselPage t = new CarouselPage();
t.CurrentPageChanged += (object sender, EventArgs e) => {
if(t.CurrentPage.Title == "Title 1"){
//Then Change your number to 2 or 3 or what ever
//Your Label.Text = 2,3,4 maybe handle this with a switch.
//3/5 Page
}
};
Upvotes: 0