Reputation: 5043
I have a WPF DataGrid and the row headers don't line up vertically with the content. Any idea why?
Upvotes: 1
Views: 441
Reputation: 5043
Seems like the RowHeaders default to VerticalAlignment = Center and TextBlock defaults to Top. They are still a little off from one another but once I changed that property it was close enough for me!
Upvotes: 1
Reputation: 8511
I believe by default the row headers are aligned like that. You should be able to tell what alignment you want by saying something like:
yourDataDrid.RowHeaderStyle.BasedOn = yourDataDrid.CellStyle;
Upvotes: 0
Reputation: 8578
Have you tried making the row height to lets say double of it's current size? It might point you that you have different alignment/padding properties set for them :) Just a suggestion tho :) And yeah, code would be helpful :)
Upvotes: 0