title: Pass different commandparameters to same command using RelayCommand WPF
body: <p>So, what I am trying to achieve here is to use the same command to execute some different kind of code. The way I want to distinguish between the code I want to be executed can be done using commandparameters. I just don't see how I can do it the way I want to, when I have to use the RelayCommand.</p>
  
  <p>This means, that I have 2 different buttons, that both uses the same command, just with different commandparameters.</p>
  
  <p>This is my XAML so far:</p>
  
  <pre><code>&lt;RibbonButton SmallImageSource="../Images/whatever.png" Label="Attribute" Command="{Binding AddItemToNodeCommand}" CommandParameter="Attribute"/&gt;
  
  &lt;RibbonButton SmallImageSource="../Images/whatever.png" Label="Method" Command="{Binding AddItemToNodeCommand}" CommandParameter="Method" /&gt;
  </code></pre>
  
  <p>This is what I have in my ViewModel:</p>
  
  <pre><code>public ICommand AddItemToNodeCommand { get; private set; }
  </code></pre>
  
  <p>and of course:</p>
  
  <pre><code>AddItemToNodeCommand = new RelayCommand(AddItemToNode);
  </code></pre>
  
  <p>Is there some way that I can be able to use that commandparameter when calling the relayCommand?</p>
  
  <p>If you need any more information, or code please just ask.</p>