有没有办法将参数(或多个参数)传递给 CallMethodAction 行为? [英] Is there a way to pass a parameter (or multiple params) to the CallMethodAction behavior?

查看:18
本文介绍了有没有办法将参数(或多个参数)传递给 CallMethodAction 行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法将一个参数(或多个参数)传递给 CallMethodAction 行为?

Is there a way to pass a parameter (or multiple params) to the CallMethodAction behavior?

推荐答案

尝试 InvokeCommandAction 一个命令而不是使用 CallMethodAction :

Try InvokeCommandAction a command instead of using CallMethodAction:

<i:Interaction.Triggers>
  <i:EventTrigger EventName="TextChanged">
    <i:InvokeCommandAction Command="{Binding TextChangedCommand}" 
        CommandParameter="{Binding ElementName=filterBox, Path=Text}"/>
  </i:EventTrigger>
</i:Interaction.Triggers>

希望能帮到你

这篇关于有没有办法将参数(或多个参数)传递给 CallMethodAction 行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆