如何在MVVM模式+ WPF中绑定TreeView控件的SelectedItemChanged事件(在ViewModel类中)

如何在MVVM模式+ WPF中绑定TreeView控件的SelectedItemChanged事件(在ViewModel类中)

问题描述:



我想在我的ViewModel类中绑定treeview的SelectedItemChanged事件.

如何在Xaml中编写它以及如何从ViewModel类处理它.

在此先感谢:)

Hi,

I would like to bind SelectedItemChanged event of treeview in my ViewModel class.

How to write it in Xaml and how to handle it from ViewModel class.

Thanks in advance :)

您可以使用事件命令行为,例如@ ^ ],则可以找到其他信息@ ^ ]
You can use event to command behavior, example @ source code[^], you can find additional info @ http://geekswithblogs.net/lbugnion/archive/2009/11/05/mvvm-light-toolkit-v3-alpha-2-eventtocommand-behavior.aspx[^]