I would like to numerate my rows in DataGrid
, for this I am using such approach
https://stackoverflow.com/a/15061668/5709159
works nice, but number in cell not adjust center horizontally nor vertically.
Then I found such solution
https://stackoverflow.com/a/2729428/5709159
But this just center a number horizontally, but not vertically.
For vertical center I found such approach
https://stackoverflow.com/a/720824/5709159
but as wrote in comments
The text was centered, but the cell width no longer matched up with its header
So, I get something like this
Do you see that there is double bottom line?
So, question is - how to center a number horizontally as well as vertically?