title: Closing nested tabs using WPF?
body: <p>I'm trying to design a UI that contains nested tabs, but I can't seem to find information on how to remove the nested tabs in an MVVM fashion.</p>
  
  <p>Here's my XAML (snipped for brevity):</p>
  
  <pre><code>&lt;TabControl Name="ProjectTabControl" DockPanel.Dock="Top" ItemsSource="{Binding ProjectTabs}" IsSynchronizedWithCurrentItem="True"&gt;
     &lt;TabControl.ContentTemplate&gt;
        &lt;DataTemplate&gt;
           &lt;TabControl DockPanel.Dock="Top" ItemsSource="{Binding FileTabs}" Padding="1"&gt;
              &lt;Button Command="{Binding CloseTabCommand}" CommandParameter="TabItem" /&gt;
           &lt;/TabControl&gt;
        &lt;/DataTemplate&gt;
     &lt;/TabControl.ContentTemplate&gt;
  &lt;/TabControl&gt;
  </code></pre>
  
  <p>My question is: what argument(s?) should I be passing in CommandParameter, and how would I affect it in the ViewModel to properly remove the tab?</p>