Just a question: The SelectedItem is not bindable to a property in the ViewModel on a MVVM pattern?
If not, how to get the selectedItem in the ViewModel?
I need becouse I've to manage the add and remove buttons.
Thanks and regards.
Andrea
5 Answers, 1 is accepted
Please,see the following thread,I believe that it could be useful for you
http://social.msdn.microsoft.com/Forums/en/wpf/thread/d9439546-95bf-41b6-ad5c-62fa41f17cb3
Hope this helps!
There should be no problem binding the SelectedItem property of RadTreeView. The attached project demonstrates element binding between a ListBox and a TreeView. Also, I'd suggest you go through the link that Vanya previously posted.
Regards,
Kiril Stanoev
the Telerik team
Hello,
I managed to delete the treeviewitem item (thanks to your post), but I wanted to create a DependencyProperty that should be using the ICommand and listen to the SelectedItemChanged event on the TreeView. How can I do this?
[quote]Ваня said:Hi,Andrea Ferrari
Please,see the following thread,I believe that it could be useful for you
http://social.msdn.microsoft.com/Forums/en/wpf/thread/essays.agency/thread/d9439546-95bf-41b6-ad5c-62fa41f17cb3
Hope this helps![/quote]
Hello,
I managed to delete the treeviewitem item
(thanks to your post), but I wanted to create a DependencyProperty that
should be using the ICommand and listen to the SelectedItemChanged event
on the TreeView. How can I do this?
Hello Adrian,
To achieve your requirement you can use the EventToCommandBehavior. This will allow you to bind an ICommand to the SelectionChanged event of RadTreeView.
Regards,
Martin Ivanov
Progress Telerik