Hi there im using a ListView in wpf and have a few columns that have auto width, now i want some padding on them but im a bit unsure how to do this? i have a red background on my header and then text in there, but i want to have some space between the border of the box and the text...

You could modify the HeaderTemplate of the GridViewColumn
<GridViewColumn ...>
<GridViewColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Margin="5,0,5,0"/>
</DataTemplate>
</GridViewColumn.HeaderTemplate>
<GridViewColumnHeader Content="Some Header" Background="Red" />
</GridViewColumn>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With