title: Avoiding ContentPresenter in ItemsControl
body: <p>Is there a way to avoid generation of <code>ContentPresenter</code> that <code>ItemsControl</code> wraps my items in? My <code>ItemsControl</code> is bound to a VM property and I'm using a <code>DataTemplate</code> in my ItemControl's Resources (without an <code>x:Key</code>) to customize the look of my collection objects. This all works fine, but inspecting through Snoop shows that all my collection objects are wrapped inside <code>ContentPresenter</code>s and not directly added to the Panel. This fact is creating some other issues for me. Is there a way to avoid the extra wrapping?</p>
  
  <p>Here's the XAML:</p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding Path=Children}"&gt;
    &lt;ItemsControl.Resources&gt;
      &lt;DataTemplate DataType="{x:Type vm:Ellipse}"&gt;
        &lt;Ellipse Fill="{Binding Fill}" Stroke="{Binding Stroke}" /&gt;
      &lt;/DataTemplate&gt;
    &lt;/ItemsControl.Resources&gt;
    &lt;ItemsControl.ItemsPanel&gt;
      &lt;ItemsPanelTemplate&gt;
        &lt;Canvas Focusable="true" Margin="10" FocusVisualStyle="{x:Null}" /&gt;
      &lt;/ItemsPanelTemplate&gt;
    &lt;/ItemsControl.ItemsPanel&gt;
    &lt;ItemsControl.ItemContainerStyle&gt;
      &lt;Style&gt;
        &lt;Setter Property="Canvas.Left" Value="{Binding XLoc}" /&gt;
        &lt;Setter Property="Canvas.Top" Value="{Binding YLoc}" /&gt;
        &lt;Setter Property="Canvas.ZIndex" Value="{Binding ZOrder}" /&gt;
      &lt;/Style&gt;
    &lt;/ItemsControl.ItemContainerStyle&gt;
  &lt;/ItemsControl&gt;
  </code></pre>