wpf事件绑定,比如一个控件的左键按下事件

 <i:Interaction.Triggers>
            <i:EventTrigger EventName="MouseLeftButtonDown">
                <i:InvokeCommandAction Command="{Binding Cmd,RelativeSource={RelativeSource AncestorType=Window}}" />
            </i:EventTrigger>
        </i:Interaction.Triggers>

  

猜你喜欢

转载自www.cnblogs.com/chlm/p/9451382.html
今日推荐