title: Custom control with several datatemplates/contentpresenters
body: <p>In a card game I need a control that shows a collection of 4 items (North, East, South and West) in a grid. The grid is 3x3 and it shows content in cells (0,1) (1,0) (1,2) and (2,1) respectively.</p>
  
  <pre><code>    &lt;bridge:SeatCollection ItemsSource="{Binding Path=Hands}"&gt;
          &lt;ItemsControl.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel Orientation="Vertical"&gt;
                      &lt;TextBlock Text="{Binding Path=Name}" /&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/ItemsControl.ItemTemplate&gt;
      &lt;/bridge:SeatCollection&gt;
  </code></pre>
  
  <p>The above I have already working and is done by creating a control that inherits from ItemsControl and does something smart in GetContainerForItemOverride as described in another post on StackOverflow.</p>
  
  <p>My question is how I can add another property to the control that contains the content that must be shown in the middle cell and how can the control render that content?</p>
  
  <p>Using the control should be like:</p>
  
  <pre><code>    &lt;bridge:SeatCollection ItemsSource="{Binding Path=Hands}"&gt;
          &lt;ItemsControl.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;TextBlock Text="{Binding Path=Name}" /&gt;
              &lt;/DataTemplate&gt;
          &lt;/ItemsControl.ItemTemplate&gt;
          &lt;bridge:SeatCollection.MiddleCell&gt;
              &lt;TextBlock Text="Content for middle cell"/&gt;
          &lt;/bridge:SeatCollection.MiddleCell&gt;
      &lt;/bridge:SeatCollection&gt;
  </code></pre>
  
  <p>According to this article (<a href="http://www.ikriv.com/dev/wpf/displayingcontent/index.html" rel="nofollow">http://www.ikriv.com/dev/wpf/displayingcontent/index.html</a>) I can add a property and use that property in a ContentPresenter</p>
  
  <pre><code>    public object MiddleCell
      {
          get { return (object)GetValue(MiddleContentProperty); }
          set { SetValue(MiddleContentProperty, value); }
      }
  
      public static readonly DependencyProperty MiddleContentProperty =
          DependencyProperty.Register("MiddleCell", typeof(object), typeof(SeatCollection), new PropertyMetadata(0));
  </code></pre>
  
  <p>But where and how in code can I add this content to my grid's middle cell?</p>