Hello,
Having a tree view with a hierarchical data template containing an image and a text block control, what I'm trying to do is: when Control key is pressed and mouse cursor is hovering the tree, the current hovered item should be underlined and when a certain underlined node is left, the underline is also removed from that node. Although one direct solution I know is to set the TextDecorations property of TextBlock control to Underline, I can't figure how exactly I can do this for only item (I can switch the item template but this will underline all nodes). Another thing I've tried was to the set the style of an item manually but in this case I must be omitting something since the horizontal alignment of the underlined item is broken for some reason. Any suggestion is welcomed.
Thanks in advance!
Daniel
Having a tree view with a hierarchical data template containing an image and a text block control, what I'm trying to do is: when Control key is pressed and mouse cursor is hovering the tree, the current hovered item should be underlined and when a certain underlined node is left, the underline is also removed from that node. Although one direct solution I know is to set the TextDecorations property of TextBlock control to Underline, I can't figure how exactly I can do this for only item (I can switch the item template but this will underline all nodes). Another thing I've tried was to the set the style of an item manually but in this case I must be omitting something since the horizontal alignment of the underlined item is broken for some reason. Any suggestion is welcomed.
Thanks in advance!
Daniel