Hello,
I am using following code to use regular checkbox in wpf rather than Infragistics themed checkbox, it works but
CheckBoxMode Auto is not working.
<Setter Property="CheckBoxStyle">
<Setter.Value>
<Style TargetType="{x:Type CheckBox}">
<Setter Property="Template">
<ControlTemplate TargetType="{x:Type CheckBox}">
<CheckBox/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Is it something I am missing here?
Hello Sameer,
You should be able to get CheckBoxMode=Auto setting working if you bind your CheckBox’s IsChecked property to its parent property like below.
<Style TargetType="{x:Type CheckBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type CheckBox}"> <CheckBox IsChecked="{Binding IsChecked, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"/> </ControlTemplate> </Setter.Value> </Setter></Style>
I have attached the sample.
Let me know if I may be of further assistance.
Thank you,Mihoko Kamiishi
I'm glad you have resolved your issue.
If you have any other questions, please do not hesitate to ask.