title: recursive menu item with default template and itemTemplate
body: <p>I have a WPF Control template for the <code>MenuItem</code> type:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type MenuItem}"&gt;
      &lt;Setter Property="Background"
              Value="Transparent" /&gt;
      &lt;Setter Property="Cursor"
              Value="Hand" /&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type MenuItem}"&gt;
                  &lt;Border Background="{TemplateBinding Background}"&gt;
                      &lt;Grid&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition Width="Auto" /&gt;
                              &lt;ColumnDefinition Width="*" /&gt;
                              &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                          &lt;ContentControl Content="{TemplateBinding Header}"
                                          Margin="5"
                                          Grid.Column="1" /&gt;
                          &lt;Path Grid.Column="2"
                                  x:Name="Indicator"
                                  Data="M1,1 L1,9 9,5Z"
                                  Fill="{StaticResource GlyphBrush}"
                                  Margin="4"
                                  Visibility="Hidden"
                                  VerticalAlignment="Center" /&gt;
                          &lt;Popup Name="PART_Popup"
                                  Placement="Right"
                                  IsOpen="{TemplateBinding IsSubmenuOpen}"
                                  AllowsTransparency="True"
                                  Grid.Column="0"
                                  Grid.ColumnSpan="2"
                                  HorizontalOffset="3"
                                  VerticalOffset="-1"&gt;
                              &lt;Border Background="Transparent"&gt;
                                  &lt;ContentControl Style="{StaticResource PopupContentStyle}"&gt;
                                      &lt;ItemsPresenter/&gt;
                                  &lt;/ContentControl&gt;
                              &lt;/Border&gt;
                          &lt;/Popup&gt;
                      &lt;/Grid&gt;
                  &lt;/Border&gt;
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;Trigger Property="IsChecked"
                                  Value="true"&gt;
                          &lt;Setter Property="Background"
                                  Value="{StaticResource ButtonHoverBackgroundBrush}" /&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsChecked"
                                  Value="false"&gt;
                          &lt;Setter Property="Background"
                                  Value="{StaticResource BackgroundBrush}" /&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="HasItems"
                                  Value="True"&gt;
                          &lt;Setter TargetName="Indicator"
                                  Property="Visibility"
                                  Value="Visible" /&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsEnabled"
                                  Value="False"&gt;
                          &lt;Setter Property="Opacity"
                                  Value="{StaticResource DisabledTransparency}" /&gt;
                      &lt;/Trigger&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
      &lt;Style.Triggers&gt;
          &lt;Trigger Property="IsMouseOver"
                      Value="True"&gt;
              &lt;Setter Property="Background"
                      Value="{StaticResource ButtonHoverBackgroundBrush}" /&gt;
          &lt;/Trigger&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>If I do now add items to a <code>MenuItem</code> the template works flawless. But if I try to add items to a bound <code>ObservableCollection</code> I run into problems as my <code>ControlTemplate</code> does not use the <code>ItemTemplate</code> of the original <code>MenuItem</code> anywhere.</p>
  
  <p>This usage causes problems:</p>
  
  <pre><code>&lt;MenuItem Header="{userInterface:Translation Language}"
            ItemsSource="{Binding AvailableLanguages}"&gt;
      &lt;MenuItem.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;MenuItem Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.ChangeLanguageCommand}"
                        CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Header}"
                        Header="{Binding}" /&gt;
              &lt;/DataTemplate&gt;
      &lt;/MenuItem.ItemTemplate&gt;
  &lt;/MenuItem&gt;
  </code></pre>
  
  <p>The <code>MenuItem</code> does not use the <code>Template</code> I specified above, instead it does again take my default template.</p>
  
  <p>I tried changing the <code>ItemsPresenter</code> of my global template to a <code>ItemsControl</code> but it did change nothing.</p>
  
  <p>How can I solve the problem?</p>