Skip to content

DataGridTemplateColumn is not completely horizontally centered. #4105

Answered by Time2Code0
comet7360 asked this question in Q&A
Discussion options

You must be logged in to vote

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

      <DataGrid ItemsSource="{Binding DataGridItems}" Grid.Row="2" AutoGenerateColumns="False" CanUserAddRows="False" GridLinesVisibility="All">
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="RADIO">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <RadioButton Background="Transparent"
                                         HorizontalAlignment="Center" 
                                         Width="18"
                                         Height…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by punker76
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@comet7360
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #4104 on May 20, 2021 10:38.