0
试图在WPF chekbox
的click
或checked
事件的command
绑定在我的视图模型,但即时通讯上的技术和事件名称,任何人都可以点我在正确的方向不确定?WPF复选框,触发器
对于现在的代码编译,但在trigger
不会调用FooCommand
<CheckBox IsChecked="{Binding PartData.ReportIncluded, Mode=TwoWay}"
VerticalAlignment="Center">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown" >
<i:InvokeCommandAction Command="{Binding FooCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</CheckBox>
尝试OnMouseLeftButton和OnPreviewMouseLeftButtonDown和OnChecked,什么都不起作用 – klashagelqvist 2012-07-06 07:40:18
i:Interaction.Triggers是否适用于其他控件上的evens? – Josh 2012-07-06 13:10:10
感谢您的anwswers,如果发现它,触发器在具有自己的datacontext的hirearciacal数据模板中,而fooCommand在usercontrol数据环境中,这就是为什么它永远不会被称为 – klashagelqvist 2012-07-06 13:25:11