用Interaction绑定控件自定义事件:
<commonCtl:GoodsTree x:Name="goodsTree" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="AddGoodsConsumeEvent">
<i:InvokeCommandAction Command="{Binding TestCommand}" >
</i:Interaction.Triggers>
事件定义:
public event AddGoodsConsume AddGoodsConsumeEvent;
触发事件时:
AddGoodsConsumeEvent(product);
AddGoodsConsumeEvent为空
Interaction通过反射应该已经为AddGoodsConsumeEvent绑定了处理方法,但是为空,不知道为什么为空,请各位帮忙看看.