title: In WPF, is it possible to specify the item's cell location within a UniformGrid panel?
body: <p>I have designed the following WPF window: </p>
  
  <pre><code>&lt;Window x:Class="Boris.Gui.Wpf.DragDropWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Width="286" Height="350" ResizeMode="CanMinimize" Title="Drag and Drop"&gt;
  
      &lt;Window.Resources&gt;
  
          &lt;!-- Sorted matches list panel --&gt;
          &lt;ItemsPanelTemplate x:Key="SortedMatchesListPanel"&gt;
              &lt;UniformGrid Rows="3" Columns="4" /&gt;
          &lt;/ItemsPanelTemplate&gt;
  
      &lt;/Window.Resources&gt;
  
      &lt;Grid&gt;
  
          &lt;ListBox 
              Name="SortedMatchesListBox" 
              Height="180" 
              Margin="12,85,12,0" 
              HorizontalAlignment="Stretch" 
              VerticalAlignment="Top" 
              ItemsPanel="{StaticResource ResourceKey=SortedMatchesListPanel}" /&gt;
  
      &lt;/Grid&gt;
  
  &lt;/Window&gt;
  </code></pre>
  
  <p>When run, the <code>SortedMatchesListBox</code> list is populated with the items, and it looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/GZcW2.png" alt="alt text"></p>
  
  <p>My question is: Is it possible to specify the cell location of the list items in the <code>UniformGrid</code> items panel? For example, is it possible to place the highlighted <code>Team 2 vs Team 5</code> item underneath the <code>Team 1 vs Team 5</code>, i.e. move it to the next cell on the right, and to preserve the blank space where it currently resides? It should look like this: </p>
  
  <p><img src="https://i.stack.imgur.com/GCBHH.png" alt="alt text"></p>
  
  <p>Right now, I am using a trick of adding a blank item to the <code>SortedMatchesListBox.ItemsSource</code> to make it happen, but what I'd really like is to be able to specify the item's cell location in the items panel. Thanks for the help.</p>