C#-WPF事件的绑定prism框架
前台代码
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
<i:Interaction.Triggers>
<i:EventTrigger EventName="TextChanged">
<i:InvokeCommandAction Command="{Binding TextChangedCommand}" CommandParameter="{Binding ElementName=txtProcessText}" />
</i:EventTrigger>
</i:Interaction.Triggers>
后台代码
private DelegateCommand<object> _textChangedCommand;
public DelegateCommand<object> TextChangedCommand => _textChangedCommand ??= new DelegateCommand<object>(ExecuteTextChangedCommand);