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

Shimmy Weitzhandler picture Shimmy Weitzhandler · Feb 22, 2011 · Viewed 8.8k times · Source

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

Answer

kruvi picture kruvi · Mar 8, 2011

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>

Hope it helps