title: Pass typeof as parameter to a command from xaml
body: <p>I'm building an application which has a RibbonWindow and a TabCollection.</p>
  
  <p>Every RibbonButton has a command to open a tab of a specific UserControl. Every command does the same with a very small difference, they open a tab with a specific UserControl. Is there a good way of passing that UserControl type to one command called OpenTabCommand?</p>
  
  <p>This is how it looks right now:</p>
  
  <p>Xaml
  ...</p>
  
  <pre><code>&lt;RibbonButton Label="OpenTab1"
                LargeImageSource="/something.png" 
                Command="{Binding OpenTab1Command}" /&gt;
  
  &lt;RibbonButton Label="OpenTab2"
                SmallImageSource="/something.png" 
                Command="{Binding OpenTab2Command}"/&gt;
  </code></pre>
  
  <p>...</p>
  
  <p>ViewModel</p>
  
  <pre><code>public RelayCommand OpenTab1Command{ get; set; }
  
  public RelayCommand OpenTab2Command { get; set; }
  
  public MainViewModel()
  {
      OpenTab1Command= new RelayCommand(OpenTab1, param =&gt; true);
  
      OpenTab2Command = new SearchCommand(OpenTab2, param =&gt; true);
  }
  
  private void OpenTab1()
  {
      var item = new TabItem
      {
          Content = new Tab1(),
      };
  
      TabCollection.Add(item);
  
      item.Focus();
  }
  
  private void OpenTab2()
  {
      var item = new TabItem
      {
          Content = new Tab2(),
      };
  
      TabCollection.Add(item);
  
      item.Focus();
  }
  </code></pre>