【发布时间】:2021-01-19 11:04:51
【问题描述】:
在我的 Xamarin.Forms 项目中,我需要一个水平旋转木马一次只滑动一个元素。是否可以通过 CarouselView 实现?有什么建议吗?
这是我当前的 CarouselView 定义:
<CarouselView AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1"
ItemsSource="{Binding Homes}" ItemTemplate="{StaticResource HomeTemplate}"
PeekAreaInsets="0" IsSwipeEnabled="True" Loop="False" IsScrollAnimated="False" ItemsUpdatingScrollMode="KeepItemsInView" HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<CarouselView.ItemsLayout>
<LinearItemsLayout Orientation="Horizontal" ItemSpacing="0" />
</CarouselView.ItemsLayout>
</CarouselView>
【问题讨论】:
-
是的,感谢它在 Android 中工作。我也会在 iOS 中测试它
标签: xamarin.forms carousel swipe