CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.89k stars 1.38k forks source link

Make carousel behave like FlipView #1093

Closed alexrainman closed 7 years ago

alexrainman commented 7 years ago

Is it possible to make this carousel behave like FlipView? I want to have only page visible at the time and swipe to scroll to the next one. Also scroll and add/remove pages programmatically.

skendrot commented 7 years ago

Why does a FlipView not work for you?

nmetulev commented 7 years ago

Agree with @skendrot, FlipView already works like this.

alexrainman commented 7 years ago

I already know that. My question is related to this control. It seems it cannot do what i want unless i fix it myself. Thanks

nmetulev commented 7 years ago

You could increase the ItemMargin to spread out the items so they are of screen and use the SelectedIndex property in code to scroll to different "pages". However, without knowing more about what you are trying to do, the FlipView sounds more like what you need than the carousel.

alexrainman commented 7 years ago

I wrote this plugin: https://github.com/alexrainman/CarouselView

Its being incorporated into Xamarin.Forms.Core and i was exploring the option to use your control for UWP instead of FlipView.

But, the main limitation i have is not FlipView itself, its UWP DataTemplate not supporting Func as parameter, like Xamarin.Forms does and like it was in WP8, so i cannot use a TemplateSelector the way i want to use it.

Thanks.