DataGridTemplateColumn is not completely horizontally centered. #4105
-
Beta Was this translation helpful? Give feedback.
Answered by
Time2Code0
May 20, 2021
Replies: 3 comments 1 reply
-
|
Try something like this as a temporary workaround. I would also consider to use the DataGridCheckBoxColumn instead of the CheckBox. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
punker76
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi @comet7360 let me add something here. Seems like the issue is related to the default <DataGridTemplateColumn Header="∺">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox MinWidth="0"
Padding="0"
HorizontalAlignment="Center"
Background="Transparent"
IsChecked="{Binding IsSelected, Mode=TwoWay}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>Happy coding |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Try something like this as a temporary workaround. I would also consider to use the DataGridCheckBoxColumn instead of the CheckBox.