title: How do I go about using InvokeCommandAction to call a method of mine and pass in parameters?
body: <p>I've been trying to figure out how to pass parameters from the <code>Loaded=""</code> event. I asked a question here: <a href="https://stackoverflow.com/questions/30488770/how-would-i-go-about-passing-a-parameter-on-loaded">How would I go about passing a parameter on Loaded=&quot; &quot;?</a> and was guided in the direction of InvokeCommandAction.</p>
  
  <p>Issue is I am unable to figure out how to actually use the InvokeCommandAction to call my method. My XAML:</p>
  
  <pre><code>        &lt;Expander x:Name="Greeting_And_Opening_Expander" ExpandDirection="Down" IsExpanded="True" FontSize="14" FontWeight="Bold" Margin="5" BorderThickness="1" BorderBrush="#FF3E3D3D"&gt;
              &lt;i:Interaction.Triggers&gt;
                  &lt;i:EventTrigger EventName="Loaded"&gt;
                      &lt;i:InvokeCommandAction Command="{Binding ExpanderLoaded}"
                                             CommandParameter="x:Static local:Sections.Opening"/&gt;
                  &lt;/i:EventTrigger&gt;
              &lt;/i:Interaction.Triggers&gt;
  </code></pre>
  
  <p>I have a method named <code>ExpanderLoaded</code> in the code behind that goes as follows:</p>
  
  <pre><code>    private void ExpanderLoaded(object sender, RoutedEventArgs e, Sections section)
      {
          //Do Stuff
      }
  </code></pre>
  
  <p>And an Enum under the same namespace:</p>
  
  <pre><code>public enum Sections
  {
      Default = 0,
      Opening = 1,
      Verify = 2
  }
  </code></pre>
  
  <p>What do I need to do to call my method using the XAML I posted above? I am very new to WPF, so please try and bear with me if I end up asking what seem to be stupid questions. I've browsed around stackoverflow reading other similar questions and have been unable to gleam enough information to continue on my own.</p>