title: WPF Interaction Trigger CallMethodAction
body: <p>I have Used Event Trigger in my View part given code as below. Almost all bindings are properly with ViewModel class - MainWindowViewModel, but for the method "CustomRibbonWindow_Loaded", its throwing runtime exception like : </p>
  
  <p><strong>An exception of type 'System.ArgumentException' occurred in Microsoft.Expression.Interactions.dll but was not handled in user code
  Additional information: Could not find method named 'CustomRibbonWindow_Loaded' on object of type 'MainWindow' that matches the expected signature.
  If there is a handler for this exception, the program may be safely continued.</strong></p>
  
  <p>I have tried putting putting <strong>TargetObject="{Binding ElementName=RR}"</strong> as well as <strong>TargetObject="{Binding}"</strong> also. But none of seems working.</p>
  
  <p>My method way in VM is as below,</p>
  
  <pre><code>private void CustomRibbonWindow_Loaded()
      {
         ...
      }
  </code></pre>
  
  <p>Please guide how to resolve.</p>
  
  <pre><code>&lt;i:Interaction.Triggers&gt;
      &lt;i:EventTrigger EventName="Loaded"&gt;
          &lt;si:CallMethodAction MethodName="CustomRibbonWindow_Loaded"/&gt;
      &lt;/i:EventTrigger&gt;
  
  &lt;/i:Interaction.Triggers&gt;
  </code></pre>
  
  <p><strong>MainWindow.xaml</strong></p>
  
  <pre><code>&lt;custom:CustomRibbonWindow x:Class="gDispatchApp.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
      xmlns:custom="clr-namespace:gDispatchAppLib.Helpers.CustomUIControls;assembly=gDispatchAppLib"
      xmlns:DockUI="clr-namespace:DockingLibrary;assembly=DockingLibrary"
      xmlns:UserControls="clr-namespace:gDispatchAppLib.View.UserControls;assembly=gDispatchAppLib"
      xmlns:AppWindows="clr-namespace:gDispatchAppLib.View.AppWindows;assembly=gDispatchAppLib"
      xmlns:VM="clr-namespace:gDispatchAppLib.ViewModel.AppWindows;assembly=gDispatchAppLib"
      xmlns:VM2="clr-namespace:gDispatchAppLib.ViewModel;assembly=gDispatchAppLib"
      xmlns:PE="clr-namespace:gDispatchAppLib.ViewModel.CADQueues;assembly=gDispatchAppLib"
      xmlns:wpfHelper="clr-namespace:gDispatchAppLib.WPFHelpers;assembly=gDispatchAppLib"   
      xmlns:conv="clr-namespace:gDispatch.MvvmValidation.WPF;assembly=gDispatch.MvvmValidation"
      xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
      xmlns:si="http://schemas.microsoft.com/expression/2010/interactions"
  
       Title="SERIS CAD"
        MinHeight="300"
                         WindowState="Maximized" HorizontalContentAlignment="Stretch"
      FlowDirection="LeftToRight" CaptionHeight="50"
                   IsIconVisible="False" WindowStyle="SingleBorderWindow"
                         xmlns:my="clr-namespace:System;assembly=mscorlib" 
                         x:Name="RR"&gt;
  &lt;i:Interaction.Triggers&gt;
      &lt;i:EventTrigger EventName="Loaded"&gt;
          &lt;si:CallMethodAction MethodName="CustomRibbonWindow_Loaded" TargetObject="{Binding ElementName=RR}"/&gt;
      &lt;/i:EventTrigger&gt;     
  &lt;/i:Interaction.Triggers&gt;
  
     ...
  
  &lt;/custom:CustomRibbonWindow&gt;
  </code></pre>