WPF- Is there a way to stop TreeViewItems from becoming selected and activated when thier parent TreeViewItem is selected?

Posted by Justin on Stack Overflow See other posts from Stack Overflow or by Justin
Published on 2011-01-06T05:49:26Z Indexed on 2011/01/06 5:53 UTC
Read the original article Hit count: 219

I have a control template for TreeViewItems and instead of showing the normal FocusVisualStyle I have a MultiTrigger set up like this:

<MultiTrigger>
            <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="true"/>
                <Condition Property="IsSelectionActive" Value="true"/>
            </MultiTrigger.Conditions>
            <Setter Property="FontWeight" Value="Bold"/>
        </MultiTrigger>

However this also causes the FontWeight to change to bold when a TreeViewItem's parent item is selected. Is there any way I can stop that from happening?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about treeview