【发布时间】:2014-12-04 13:22:10
【问题描述】:
WPF - 通过事件命令
我已经通过 Command 处理了 TextChanged 事件。
<TextBox Text="{Binding ConnectionString, Mode=TwoWay}" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity">
<i:Interaction.Triggers>
<i:EventTrigger EventName="TextChanged">
<i:InvokeCommandAction Command="{Binding Path=SomeCommand, Mode=OneWay}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBox>
我的参考资料:
- Microsoft.Expression.Interactions
- Systsem.Windwos.Interactivity
例外:
类型的第一次机会异常 'System.Windows.Markup.XamlParseException' 发生在 PresentationFramework.dll
附加信息:无法加载文件或程序集 'System.Windows.Interactivity, PublicKeyToken=31bf3856ad364e35' 或一 其依赖项。系统找不到指定的文件。
【问题讨论】: