WPF TreeView Show Selection When Focus is Lost

  • Thread starter Thread starter KenKrugh
  • Start date Start date
K

KenKrugh

Guest
I have a TreeView with items whose headers are a StackPanel containing an image and a label, the items can be a font set or a singular font. Looks like this:

1592443.jpg

I see that WinForms has .HideSelection, but WPF doesn't. I've played a bit with trying to do it with <TreeView.ItemContainerStyle> in the XAML but haven't had any success.

I'm pretty sure I can write code in the LostFocus event to change the background color of the label, but is there a better way?

Thanks,
Ken

Continue reading...
 
Back
Top