In my RadGridView, I have a column for editing a boolean property. This shows up as a checkbox which is always aligned with the left of the cell. This looks a little strange and so I would like to center the checkbox in the column. Setting the TextAlignment property does not have any effect on the checkbox. One alternative is to appear to set the CellTemplate and Edithave I can change the alignment by setting a CellTemplate and CellEditTemplate on the column as follows:
<TelerikGrid:GridViewDataColumn UniqueName="IsDeliveryComplete" Header="Complete" IsReadOnly="False" Width="70">
<TelerikGrid:GridViewDataColumn.CellTemplate>
<DataTemplate>
<CheckBox HorizontalAlignment="Center" IsChecked="{Binding IsDeliveryComplete,Mode=TwoWay}"/>
</DataTemplate>
</TelerikGrid:GridViewDataColumn.CellTemplate>
<TelerikGrid:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<CheckBox HorizontalAlignment="Center" IsChecked="{Binding IsDeliveryComplete,Mode=TwoWay}"/>
</DataTemplate>
</TelerikGrid:GridViewDataColumn.CellEditTemplate>
</TelerikGrid:GridViewDataColumn>
This seems like a lot of XAML just to center a checkbox - it there a simpler/cleaner/nicer way?