Kent Boogaart
2009-09-04 18:20:53
That helps in not having to set the width. However, there is still a gap between the two columns. Any way to close that up?
statenjason
2009-09-04 18:26:31
Alas, the GridViewRowPresenter hard-codes the Margin to 6,0,6,0. I'm afraid it would be a fair amount of work to work around this.
Kent Boogaart
2009-09-04 19:20:49
A hacky workaround is to set the Margin of the containing Grid to -6,0,-6,0.
Kent Boogaart
2009-09-04 19:26:05
I've been trying to solve a similar issue with the column margins - thanks for pointing out the hard-coding. Now, the question is why? Guess we'll never know.
serialhobbyist
2009-09-06 06:38:10
A:
There is a very good article about this issue. http://www.interact-sw.co.uk/iangblog/2007/05/30/wpf-listview-column-margins I hope Microsoft fix this issue asap
Asif
2009-10-27 15:43:31
A:
Digging up an old thread, but I found a dodgy fix for this
<Grid Background="{Binding backGround}" Margin="-6,0,-6,0">
<TextBlock Margin="6,0,6,0" Text="{Binding myText}" TextAlignment="Right" />
</Grid>
Moves the margins so the background color fills the entire cell, but then moves them back so the text is still in the right spot. Works for now until it's fixed properly.
mrnye
2009-11-06 08:18:32