【wpf】事件转命令

<UserControl .....
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity">
<Grid>
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="MouseLeftButtonUp">
            <i:InvokeCommandAction
                command="{Binding DataContext.....}"
                CommandParameter="{Binding}"/>
        </i:EventTrigger>
    </i:Interaction.Triggers>

 

posted @ 2024-03-27 16:02  春天花会开,  阅读(139)  评论(0)    收藏  举报