Hi @BitSmithy ,
Welcome to Microsoft Q&A!
The solution is to put the CheckBx in ContentPresenter
, and set the background of ContentPresenter
to AliceBlue.
<Style x:Name="WCTDataGrid_CheckBoxHeaderStyle" TargetType="wctprimitives:DataGridColumnHeader">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="wctprimitives:DataGridColumnHeader">
<ContentPresenter Background="AliceBlue" >
<CheckBox MaxWidth="40" Margin="5,0,0,0"/>
</ContentPresenter>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.