I have a style that I am applying to the ItemContainerStyle of a Listview. It puts a line across the bottom of the row and sets the height of the row.
However for some reason - each row seems to have rounded corners (as seen in the snapshot attached). When I look at the style in Blend - there are no rounded corners.
How can I get rid of the rounded corners?
<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>
Round conrner is because of this line . you have assigned thickness 1 to the bottom
<Setter Property="BorderThickness" Value="0,0,0,1" />
change this to
<Setter Property="BorderThickness" Value="0,0,0,0" />
I think this has nothing todo with your Style of the ListView, but with the Style of your GridViewColumn inside the ListView. Because that style is missing.
Could you post your sample data xml?
精彩评论