我有一个样式,我正在应用于Listview的ItemContainerStyle。它在行的底部放置一条线并设置行的高度。
但是出于某种原因 - 每行似乎都有圆角(如附带的快照中所示)。当我看到Blend中的样式时 - 没有圆角。
如何摆脱圆角?
<Style TargetType="ListViewItem" x:Key="RowStyle">
<Setter Property="BorderThickness" Value="0,0,0,1" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonPressedColor}" />
<Setter Property="Height" Value="40" />
<Setter Property="Background" Value="#FFF9EDED"/>
</Style>
<ListView x:Name="lvw_FileList" Background="{DynamicResource Watermark}" ItemContainerStyle="{StaticResource RowStyle}" BorderBrush="{DynamicResource GreyBorderColor}" BorderThickness="3" Margin="0" ItemsSource="{Binding Mode=OneWay}" d:DataContext="{d:DesignData /SampleData/SampleListItems.xaml}" Foreground="{DynamicResource TextColor}">
<ListView.View>
<GridView AllowsColumnReorder="False">
<GridView.ColumnHeaderContainerStyle>
<Style>
<Setter Property="UIElement.Visibility" Value="Collapsed" />
</Style>
</GridView.ColumnHeaderContainerStyle>
<GridViewColumn Header="Picture" CellTemplate="{DynamicResource PictureCell}" />
<GridViewColumn Header="Name" CellTemplate="{DynamicResource CompanyNameCell}" />
<GridViewColumn Header="Action" CellTemplate="{DynamicResource ActionCell}" />
<!--<GridViewColumn Header="Delete" Width="50"/>-->
</GridView>
</ListView.View>
</ListView>
答案 0 :(得分:0)
<Setter Property="BorderThickness" Value="0,0,0,1" />
将此更改为
<Setter Property="BorderThickness" Value="0,0,0,0" />
答案 1 :(得分:0)
我认为这与ListView的Style没什么关系,但是ListView中的GridViewColumn的样式。因为缺少那种风格。
您可以发布样本数据xml吗?