I have a WPF TreeView with some of the items disabled - IsEnabled = false.
When I click on the disabled item, the parent item gets selected (I don't like this). I want to stay on the current item when some disabled item is clicked. Is this possible and how?
Bind IsHitTestVisible to IsEnabled. Something like this:
<Style TargetType="TreeViewItem">
<Setter Property="IsHitTestVisible" Value="{Binding IsEnabled}" />
</Style>
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