title: How to add the same command to WPF buttons in ItemsControl
body: <p>How would you add command to a wpf button that is part of <code>ItemsControl</code> and is modifying the <code>ItemsSource</code> itself?</p>
  
  <p>So here is my XAML:</p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding PluginVMs}"&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel&gt;
                  &lt;Button x:Name="btnStampDuplicate" 
                          Content="Duplicate this control"
                          Command="{Binding ?????????}"/&gt;
                  &lt;!-- other stuff --&gt;
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>And here is my viewmodel:</p>
  
  <pre><code>public ObservableCollection&lt;PluginViewModel&gt; PluginVMs
  {
      get { return _pluginVMs; }
      set
      {
          if (_pluginVMs != value)
          {
              _pluginVMs = value;
              NotifyPropertyChanged("PluginVMs");
          }
      }
  }
  </code></pre>
  
  <p>As you can see <code>PluginVMs</code> is collection of <code>PluginViewModel</code>. So I am aware that the Command that is available from the <code>btnStampDuplicate</code> should be implemented inside of <code>PluginViewModel</code>. </p>
  
  <p>However, as the name duplicate suggest, I would like to make a duplicated copy of the currently generated <code>PluginViewModel</code> inside of <code>PluginVMs</code>. What is the best approach to give that kind of functionality to <code>btnStampDuplicate</code>?</p>