title: How to place CheckBoxes in different rows/columns within a ListBox in WPF?
body: <p>In my WPF desktop application, I have a ListBox that I would like to display with two rows and two columns (i.e., a 2x2 grid), with a Checkbox in each of the four row/column spots - my XAML code is below.  Note that I don't want to do any data binding.  The code below works, but what shows up is that all four CheckBoxes are right on top of each other, even though I've specified that they should be in different rows/columns.  Could someone point out what I'm doing wrong and how to correct the XAML?  Every example I've found on the internet is a data-bound example, and this needs to be without data-binding (i.e., explicit).</p>
  
  <pre><code>&lt;ListBox Margin="0,0,10,10" Name="myListBox" Height="139" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="112" &gt;
      &lt;ListBox.ItemsPanel&gt;
      &lt;ItemsPanelTemplate&gt;
          &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="*"/&gt;
              &lt;RowDefinition Height="*"/&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="50"/&gt;
              &lt;ColumnDefinition Width="50"/&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;/Grid&gt;
      &lt;/ItemsPanelTemplate&gt;
      &lt;/ListBox.ItemsPanel&gt;
  
      &lt;CheckBox Content="WCF"  Grid.Row="0" Grid.Column="0"/&gt;
      &lt;CheckBox Content="ASP.NET"  Grid.Row="0" Grid.Column="1"/&gt;
      &lt;CheckBox Content="Java"  Grid.Row="1" Grid.Column="0"/&gt;
      &lt;CheckBox Content="C+"  Grid.Row="1" Grid.Column="1"/&gt;
  &lt;/ListBox&gt;
  </code></pre>