1

When i rebuild a WPF treeview i want to set the selected item like before the rebuild. Therefore I set the property IsSelected to true and call the method focus() for the treeviewitem. But the background of the selected item is only a pale gray color. How can achieve the standard blue background programmatically. When I click the item with the mouse the item background is blue again.

Rolf
  • 191
  • 1
  • 4
  • 13

1 Answers1

0

You should use ContainerFromItem

For more informations access this link :

link to containerfromitem usage

Community
  • 1
  • 1
Dragos Stoica
  • 1,753
  • 1
  • 21
  • 42