How can i bind the IsEnabled property of the checkbox in a XamDataTree to a property for each node?
Hello,
Thank you for your feedback. I am glad that you have managed to resolve your issue.
Never mind, I figured it out. Thanks for your help, I have marked the question answered. For others, I added this to the "cbstyle"
<ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="True"> <Setter TargetName="checkBox" Property="Opacity" Value="1"/> <Setter TargetName="IndeterminateIcon" Property="Opacity" Value="1" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="checkBox" Property="Opacity" Value="0.5"/> <Setter TargetName="IndeterminateIcon" Property="Opacity" Value="0.5" /> </Trigger> </ControlTemplate.Triggers>
hmmm I guess I'd need to also customize the Indeterminate tick mark as well...
I just want the checkmark inside of the disabled checkbox to be a little bit lighter than when enabled. So, if the checkmark is black when enabled, I want it gray when disabled. I found how to change the color of the checkmark <Path x:Name="checkBox" Height="8" Width="10" Stretch="Fill" Visibility="Collapsed" Fill="{StaticResource CheckBoxGlyphBackgroundBrush}"
but that controls it in any state, I want to only change it when the checkbox is in the disabled state. Here's a pic, I lightened the checkmark in the disabled checkbox using paint to show what I would like. This will make it easier for the user to know the checkbox is disabled.
Hello Travis,
Thank your for your reply. Could you please provide me with some more details on how exactly you want the disabled checkbox to appear ?
Looking forward to hearing from you.