I need to vertically center a DataGridCheckBoxColumn
. Since I did not find a Property inside DataGridCheckBoxColumn
, I applied an ElementStyl
I have a suspicion that this is a bug (as it doesn't happen on other column types).
To work around it, all you need to do is make sure you base your style on the default style; by adding BasedOn="{x:Static DataGridCheckBoxColumn.DefaultElementStyle}"
to the Style
element:
This approach has the advantage that you don't have to do lots of work if you are intending on changing the DataGrid.IsReadOnly
property at runtime.