大佬教程收集整理的这篇文章主要介绍了Xamarin Forms CollectionView 最后一项未正确显示,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个简单的水平 CollectionVIEw,它工作正常,只是最后一个项目显示不正确,我必须强制滚动它。
我尝试了各种填充和边距,但唯一可以显示的属性是 ItemSpacing="20" 或更大。问题是,如果我添加更多项目,问题仍然会再次出现,这是一个动态列表。
这是内容页下直接stacklayout的代码。
<StackLayout VerticalOptions="Center" HorizontalOptions="FillAndExpand">
<StackLayout BACkgroundcolor="lightGray" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" >
<CollectionVIEw Heightrequest="40" VerticalOptions="Fill" HorizontalOptions="Fill" margin="5" >
<CollectionVIEw.ItemsLayout>
<linearItemsLayout OrIEntation="Horizontal" ItemSpacing="10"/>
</CollectionVIEw.ItemsLayout>
<CollectionVIEw.Itemssource>
<x:Array Type="{x:Type x:string}">
<x:string>Open (Item)</x:string>
<x:string>SIDe Menu</x:string>
<x:string>How to?</x:string>
<x:string>BACk/Cancel</x:string>
<x:string>logout</x:string>
<x:string>Yes/No</x:string>
<x:string>App Info</x:string>
</x:Array>
</CollectionVIEw.Itemssource>
<CollectionVIEw.ItemTemplate>
<DataTemplate>
<Frame BACkgroundcolor="White" bordercolor="DarkCyan" CornerRadius="20" HasShadow="false" padding="10" margin="0">
<Label Text="{Binding}" Textcolor="DarkCyan"/>
</Frame>
</DataTemplate>
</CollectionVIEw.ItemTemplate>
</CollectionVIEw>
</StackLayout>
</StackLayout>
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的Xamarin Forms CollectionView 最后一项未正确显示全部内容,希望文章能够帮你解决Xamarin Forms CollectionView 最后一项未正确显示所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。