I've CheckBox and RadioButton. I need bind IsEnabled property to IsChecked property
<CheckBox x:Name="check_box" Content="CheckBox" IsChecked="True" />
<RadioButton Content="Depending Component" IsChecked="True" Margin="15,3,0,0" IsEnabled="{Binding check_box.IsChecked}" />
Is there any way to do it without the code writing?
Yes, you need to use an ElementName (MSDN) binding:
<CheckBox x:Name="check_box" Content="CheckBox" IsChecked="True" />
<RadioButton IsEnabled="{Binding ElementName=check_box, Path=IsChecked,
TargetNullValue=false}" .../>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With