title: Binding to specific rows and columns of a Grid
body: <p>I have a <code>ContainerViewModel</code> which inherits <code>Conductor&lt;T&gt;.Collection.AllActive</code> and a <code>PanelViewModel</code> which inherits <code>Screen</code> and whose lifetime is controlled by <code>ContainerViewModel</code></p>
  
  <p>My <code>ContainerView</code> uses a <code>templated</code> <code>ItemsControl</code> to render a my <code>Collection&lt;T&gt;</code> managed by the conductor.  This view currently uses a <code>UniformGrid</code> control and the <code>items</code> are displayed in the order for which they are added to the <code>Conductor&lt;T&gt;.Collection</code> (<code>Items</code> are removed and added at <code>run-time</code> via an <code>event</code> which provides a <code>Position</code>).</p>
  
  <p>I would like to switch to use a <code>Grid</code> with a predefined number of <code>Columns</code> and <code>Rows</code> as below:</p>
  
  <pre><code>+------------------------------------------------------+
  |      1     |      2      |      3      |      4      |
  |     0,0    |     0,1     |     0,2     |     0,3     |
  +------------------------------------------------------+
  |      5     |      6      |      7      |      8      |
  |     1,0    |     1,1     |     1,2     |     1,3     |
  +------------------------------------------------------+
  </code></pre>
  
  <p>The single number represents a <code>Position</code> and the <code>Points</code> \ <code>Coordinates</code> underneath the <code>Row Index</code> and <code>Column Index</code>.</p>
  
  <p>I know I could do something like the following:</p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding Items}"&gt;
      &lt;!-- ItemsPanelTemplate --&gt;
      &lt;ItemsControl.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;Grid&gt;
                  &lt;Grid.RowDefinitions&gt;
                      &lt;RowDefinition /&gt;
                      &lt;RowDefinition /&gt;
                  &lt;/Grid.RowDefinitions&gt;
                  &lt;Grid.ColumnDefinitions&gt;
                      &lt;ColumnDefinition /&gt;
                      &lt;ColumnDefinition /&gt;
                      &lt;ColumnDefinition /&gt;
                      &lt;ColumnDefinition /&gt;
                  &lt;/Grid.ColumnDefinitions&gt;
              &lt;/Grid&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ItemsControl.ItemsPanel&gt;
  
      &lt;!-- ItemContainerStyle --&gt;
      &lt;ItemsControl.ItemContainerStyle&gt;
          &lt;Style&gt;
              &lt;Setter Property="Grid.Column"
                      Value="{Binding ColumnIndex}" /&gt;
              &lt;Setter Property="Grid.Row"
                      Value="{Binding RowIndex}" /&gt;
          &lt;/Style&gt;
      &lt;/ItemsControl.ItemContainerStyle&gt;
  
      &lt;!-- ItemTemplate --&gt;
      &lt;ItemsControl.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;ContentControl Content="{Binding}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/ItemsControl.ItemTemplate&gt;
  &lt;/ItemsControl&gt;
  </code></pre>
  
  <p>My issue with the above is that the <code>PanelViewModel</code> to be displayed as the <code>Content</code> needs a concept of the <code>ColumnIndex</code> and <code>RowIndex</code> properties for this to hook into.  I'm not entirely happy with this as I see it being the responsibility of <code>ContainerViewModel</code> to manage the positioning.</p>
  
  <p>Is there a way I can achieve this where only the <code>ContainerViewModel</code> is aware of the <code>Position</code> concept?</p>