我在 ListView 中启用了分组,并且组标题具有浅灰色背景色。
如何删除它\使其透明?
最佳答案
iOS 设置 Cell 实例的默认背景颜色。您可以通过 iOS platform-specific property 更改它:
<ListView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core">
<ListView.GroupHeaderTemplate>
<DataTemplate>
<ViewCell ios:Cell.DefaultBackgroundColor="Transparent">
<!--other views...-->
</ViewCell>
</DataTemplate>
</ListView.GroupHeaderTemplate>
</ListView>
关于xamarin.forms - 从 iOS 上的 ListView 组标题中删除背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46746843/