elementstyle

DataGridCheckBoxColumn loses IsReadOnly state when applying ElementStyle

无人久伴 提交于 2019-12-30 19:52:26
问题 I need to vertically center a DataGridCheckBoxColumn . Since I did not find a Property inside DataGridCheckBoxColumn , I applied an ElementStyle . However, when this style is applied, my CheckBox becomes checkable again, although it is set to ReadOnly in my DataGrid (the whole Datagrid is ReadOnly ), and in DataGridCheckBoxColumn itself. How can I create a vertically centered CheckBox that keeps its ReadOnly state? Here is my code: <DataGrid IsReadOnly="True"> <DataGrid.Columns>

DataGridCheckBoxColumn loses IsReadOnly state when applying ElementStyle

青春壹個敷衍的年華 提交于 2019-12-30 19:52:08
问题 I need to vertically center a DataGridCheckBoxColumn . Since I did not find a Property inside DataGridCheckBoxColumn , I applied an ElementStyle . However, when this style is applied, my CheckBox becomes checkable again, although it is set to ReadOnly in my DataGrid (the whole Datagrid is ReadOnly ), and in DataGridCheckBoxColumn itself. How can I create a vertically centered CheckBox that keeps its ReadOnly state? Here is my code: <DataGrid IsReadOnly="True"> <DataGrid.Columns>