Click here to Skip to main content
11,931,104 members (55,386 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# WPF MVVM
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.
Posted 18-Dec-12 2:07am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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!

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 23 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100