作者热门文章
- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在使用 ViewCell
在我的表格设置页面中创建行。我有一个设置可以选择浅色或深色主题。
<ViewCell Height="50">
<StackLayout x:Name="darkTheme" VerticalOptions="FillAndExpand" Padding="20,0,20,0">
<StackLayout Orientation="Horizontal" VerticalOptions="CenterAndExpand">
<Label Text="Dark" XAlign="Center" FontSize="15"/>
<Label x:Name="darkThemeCheckmark" Text="{x:Static local:FontAwesome.FACheck}" FontFamily="FontAwesome" XAlign="Center" IsVisible="false" FontSize="12" HorizontalOptions="EndAndExpand"/
</StackLayout>
</StackLayout>
</ViewCell>
<ViewCell Height="50">
<StackLayout x:Name="lightTheme" VerticalOptions="FillAndExpand" Padding="20,0,20,0">
<StackLayout Orientation="Horizontal" VerticalOptions="CenterAndExpand">
<Label Text="Light" XAlign="Center" FontSize="15"/>
<Label x:Name="lightThemeCheckmark" Text="{x:Static local:FontAwesome.FACheck}" FontFamily="FontAwesome" XAlign="Center" IsVisible="false" FontSize="12"/>
</StackLayout>
</StackLayout>
</ViewCell>
每当我从深色主题切换到浅色主题时,我的行之间的左侧都有微弱的光线,我似乎无法摆脱。请引用下图:
在我的渲染器中,我设置了以下内容:
tableView.LayoutMargins = new UIEdgeInsets() { Left = 20 };
cell.SeparatorInset = new UIEdgeInsets() { Left = 20 };
cell.LayoutMargins = new UIEdgeInsets() { Left = 20 };
谁知道如何摆脱这条线?
编辑:
最佳答案
我是 xamarin 的新手,但是,根据 this post您需要在 UITableView 和 UITableViewCell 子类上执行此操作。
希望对您有所帮助。 :)
关于c# - 如何在 Xamarin Forms 中部分切割 ViewCell 分隔线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43734249/
我是一名优秀的程序员,十分优秀!