这是我的listview类
public class ListViewClass : ListView
{
public ListViewClass ()
{
var cell = new DataTemplate(typeof(ViewCellClass));
ItemTemplate = cell;
SeparatorVisibility = SeparatorVisibility.None;
this.Style = (Style)Application.Current.Resources["commonBottomMarginThickness"];
HasUnevenRows = true;
}
}
我附上了截图。如何在上面和下面的列表视图项之间放置空格。
答案 0 :(得分:1)
将值Transparent
添加到SeparatorColor属性。
像这样:
public ListViewClass ()
{
var cell = new DataTemplate(typeof(ViewCellClass));
ItemTemplate = cell;
SeparatorVisibility = SeparatorVisibility.None;
SeparatorColor = Color.Transparent;
this.Style = (Style)Application.Current.Resources["commonBottomMarginThickness"];
HasUnevenRows = true;
}