First the context:
- I have a treeview that is bound to an ObservableCollection (Hierarchical).
- The TreeView has IsVirtualizing set to true and mode set to Hierarchical
- We have an ItemTemplate that consists of an UserControl icon and Textblock
- Above the treeview is a textbox and when we enter text in the textbox, any text entered will search the collections and any items that
contain those characters will be displayed in a grid view flat list.
If we select an item in the grid view, we need the ability, to have that item highlighted when we return to treeview. We have no problem highlighting the item when the item was already expanded in the treeview. However, if it was not visually present, we want the ability to expand/highlight the item accordingly.
I have tried ExpandItemByPath, GetItemByPath with no luck. I have tried different path separators with no luck.
How can I achieve my intended result?
Paul
- I have a treeview that is bound to an ObservableCollection (Hierarchical).
- The TreeView has IsVirtualizing set to true and mode set to Hierarchical
- We have an ItemTemplate that consists of an UserControl icon and Textblock
- Above the treeview is a textbox and when we enter text in the textbox, any text entered will search the collections and any items that
contain those characters will be displayed in a grid view flat list.
If we select an item in the grid view, we need the ability, to have that item highlighted when we return to treeview. We have no problem highlighting the item when the item was already expanded in the treeview. However, if it was not visually present, we want the ability to expand/highlight the item accordingly.
I have tried ExpandItemByPath, GetItemByPath with no luck. I have tried different path separators with no luck.
How can I achieve my intended result?
Paul