Click here to Skip to main content
15,607,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have used a extened treeview control with selecteditem dependency property in my view. I am binding the treeview data from the viewmodel list property. Now when the user selects an item in the extended treeview I am able to view the selected item in the dependency property class.

But I want to access this property in my view's view model to work on it.

If anyone have idea to solve this please reply me.

Thanks in advance.

1 solution

I recently posted a possible (and working) answer to a post similar to this.
Because the WPF TreeView does not support this, my answer is to make an easy solution to create an extension of the TreeView and expose the DependencyProprty there.

wpf mvvm treeview get selected item

Hope it helps!
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900