title: Style me an ItemsControl subclass please - stuch with ItemsPresenter
body: <p>I have an control that is subclassed from <code>ItemsControl</code>, called <code>WorkSheet</code>:</p>
  
  <pre><code>public sealed class WorkSheet : ItemsControl {
  </code></pre>
  
  <p>Its elements are forced to be <code>WorkTiles</code>:</p>
  
  <pre><code>    /// &lt;inheritdoc /&gt;
      protected override bool IsItemItsOwnContainerOverride(object item) {
          return (item is WorkTile);
      }
  
      /// &lt;inheritdoc /&gt;
      protected override DependencyObject GetContainerForItemOverride() {
          return new WorkTile();
      }
  </code></pre>
  
  <p>So far -  so good. I want the <code>WorkSheet</code> to use a <code>Canvas</code> for presenting the <code>WorkItems</code>, position being determined by overriing <code>ArrangeOverride</code>, which is called and positions properly determined. The exact psosition is being determined in overrides. I am pretty lost in the styling, though. I simply can not get the items to appear. In The Generic.xaml, I have defined the styles. They work, but not as they should:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type local:WorkSheet}"&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate&gt;
                  &lt;Border&gt;
                      &lt;ItemsPresenter /&gt;
                  &lt;/Border&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
      &lt;Setter Property="ItemsPanel"&gt;
          &lt;Setter.Value&gt;
              &lt;ItemsPanelTemplate&gt;
                  &lt;Canvas /&gt;
              &lt;/ItemsPanelTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
      &lt;Setter Property="ItemTemplate"&gt;
          &lt;Setter.Value&gt;
              &lt;DataTemplate&gt;
                  &lt;ContentPresenter /&gt;
              &lt;/DataTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Here,pretty much, in the presentation tree, the <code>ItemsPresenter</code> is the lowest element. The subelements of <code>ItemsPresenter</code> never appear. I also tried putting a <code>Canvas</code> into the <code>ControlTemplate</code> with <code>IsItemsHost="true"</code> - again, no items. Anyone any idea what I am doing wrong here?</p>
  
  <p>Again, as explanation - I put a breakpoint into a button handler on the form and use the Visualizer to see the visual tree. The hierarchy I get is:</p>
  
  <p><code>WorkSheet -&gt; Border -&gt; ItemsPresenter</code> ... and nothing below.</p>
  
  <p>Obviously this means the <code>ControlTemplate</code> is used, but the <code>ItemsPanel</code> is never invoked.</p>