Search code examples
xamlmvvmexpression-blend

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


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


Solution

  • 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