首页 新闻 会员 周边

WPF KeyBinding CommandParameter 传参问题

0
悬赏园豆:10 [待解决问题]

   <UserControl.InputBindings>

<KeyBinding Key="Delete" Command="{Binding DeleteSolutionGroupCommand}"
                    CommandParameter="{Binding ElementName=tvMain, Path=SelectedItem}"></KeyBinding>
    </UserControl.InputBindings>

 

如题:tvMain为TreeView的控件名,这种写法无法将当前选中的TreeViewItem传递给Command,请问博友这个地方该怎么写?

wpf
BoyLife的主页 BoyLife | 初学一级 | 园豆:18
提问于:2013-07-12 17:14
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册