命令参数在Treeview上下文菜单中为null

问题描述:



在树形视图中,我希望通过命令参数在其上下文菜单中打开的项目对象.但是我目前正在获得空值.

样本,

Hi,

In treeview I want item object on which context menu is open through command parameter. But I am getting null value currently.

Sample,

<treeview.contextmenu>
              <contextmenu>

           <menuitem header="Check">
                        Command="{Binding StartPuttyCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource   AncestorType=ContextMenu}, Path=PlacementTarget.SelectedItem}"/&gt;
              </menuitem></contextmenu>
</treeview.contextmenu>



在此先感谢
Brinda.



Thanks in Advance
Brinda.

^ ]