title: Bind buttons to different ViewModels [MVVM]
body: <p>I have two buttons in one <em>View</em>, is it possible to bind one button to one command in first <em>ViewModel</em> and another button bind to second command in second <em>ViewModel</em>? Just to add both <em>ViewModels</em> are initialized.</p>
  
  <pre><code>    &lt;Button Command="{Binding ElementName=MainTreeView, Path=DataContext.FirstCommand}" CommandParameter="{Binding NameE}"&gt;
      &lt;Label Content="{Binding NameE}"/&gt;
   &lt;/Button&gt;
    &lt;Button Command="{Binding ElementName=MainTreeView, Path=DataContext.SecondCommand}" CommandParameter="{Binding NameD}"&gt;
      &lt;Label Content="{Binding NameD}"/&gt;
   &lt;/Button&gt;
  </code></pre>
  
  <p>And my two <em>ViewModels</em>:</p>
  
  <pre><code>public class FirstViewModel : INotifyPropertyChanged
  {
       public MyICommand&lt;string&gt; FirstCommand { get; private set; }
  
       public HomeViewModel()
      {
          FirstCommand = new MyICommand&lt;string&gt;(myFirstCommand);
      }
  
      public void myFirstCommand(string par)
      {
          Console.Beep();
      }
  }
  
  
  public class SecondViewModel : INotifyPropertyChanged
  {
       public MyICommand&lt;string&gt; SecondCommand { get; private set; }
  
       public HomeViewModel()
      {
          SecondCommand = new MyICommand&lt;string&gt;(mySecondCommand);
      }
  
      public void mySecondCommand(string par)
      {
          Console.Beep();
      }
  }
  </code></pre>
  
  <p>EDIT: In a view where are buttons i have <code>&lt;ContentPresenter Content="{Binding Content}"/&gt;</code> and that Content have <em>View</em> with a <em>ViewModel</em> i wanna reach with buttons</p>