Replies: 1 comment 1 reply
-
I'd rather do it from ViewModel and bind IsExpanded in a style for TreeViewItem. There was an example anywhere in Q&A iirc but I can't find it rn. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello I have been trying to get the the items in a treeview to expand in order for the selected item in the tree view to be visible.
This is where I am at rn:
This only expands the parent on the top level, and then the
ContainerFromItem
returns null when trying to get the parent on the next level. I think this is because there is no TreeViewItem created for it yet because it hasn't been made visible yet.So I guess I somehow need to wait for everything to load after setting IsExpanded to true, but how do I do that? I didn't find any event...
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions