simple question: How can I set a padding on a dataGridCell in WPF?
(either one at a time or on all cells, I don't care)
I have tried using the DataGrid.CellStyle
property by adding a setter on the DataGridCell.Padding
property as well as using the DataGridColumn.CellStyle
property in the same way with no effect.
I also tried using the DataGridColumn.ElementStyle
property with no more luck.
I'm kind of stuck there, has anyone managed to get a padding applied on a dataGridCell?
NB: I'll add that no, I cannot use transparent borders to do this, since I already use the border properties for something else. I also cannot use the margin property (which seems to work, surprisingly enough) as I use the background property and I don't want any "blank" space between my cells.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…