title: WPF ContextMenu itemtemplate, menuitem inside menuitem
body: <p>I have the following xaml:</p>
  
  <pre><code>&lt;ContextMenu ItemsSource="{Binding TestItems}"&gt;
       &lt;ContextMenu.ItemTemplate&gt;
            &lt;DataTemplate DataType="models:TestItemModel"&gt;
                &lt;MenuItem IsChecked="{Binding IsSelected}" Header="{Binding Header}"  /&gt;
            &lt;/DataTemplate&gt;
       &lt;/ContextMenu.ItemTemplate&gt;
  &lt;/ContextMenu&gt;
  </code></pre>
  
  <p>The TestItemModel class only consists of a IsSelected boolean property and a Header string property. </p>
  
  <p>TestItems is a list of TestItemModels.</p>
  
  <p>The data is binded to the contextmenu but it is reflected in the UI as a MenuItem inside a MenuItem (with the additional margins as such, making the menu very big). I can fix this by changing the MenuItem inside the DataTemplate to a TextBox, but then I cannot bind the IsSelected anymore (which I need for visualization properties).</p>
  
  <p>There are a couple of questions I have regarding this:</p>
  
  <ul>
  <li>Why is there a MenuItem inside a MenuItem? This doesn't make sense to me as it's not binded to a menuitem list but to a list of TestItemModels.</li>
  <li>How can I resolve this?</li>
  </ul>