This is a migrated thread and some comments may be shown as answers.

Checkbox for inline edit of a boolean column is not centred horizontally

1 Answer 45 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 01 Dec 2017, 04:57 PM

I have tried to provide a CellEditorStyle, but to no effect

 

<tg:DataGridBooleanColumn PropertyName="Completed" Header="Completed" SizeMode="Auto">                                           <tg:DataGridBooleanColumn.CellEditorStyle>
         <Style TargetType="CheckBox">
              <Setter Property="HorizontalAlignment" Value="Center"/>
              <Setter Property="HorizontalContentAlignment" Value="Center"/>
  </Style><br>                                        </tg:DataGridBooleanColumn.CellEditorStyle><br>                                    </tg:DataGridBooleanColumn>

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 05 Dec 2017, 11:15 AM
I now see it is really a general problem with alignment of standard checkboxes. I ended up using Padding to align the checkbox centrally and set the minimum width to "0".
Tags
DataGrid
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or