title: WPF List box with two separated columns
body: <p>I have to create custom list box the same as on the picture.</p>
  
  <p><a href="https://i.stack.imgur.com/w4SmF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w4SmF.png" alt="enter image description here"></a></p>
  
  <p>I've created <strong>UpDown control</strong> for each item in list box. But I need to have two columns in list box if will be many items. If it will be two columns, they must be separated as on the picture and each of the column should have border with round corners.</p>
  
  <p>Code for list box is below:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type ListBox}" x:Key="ListBoxService"&gt;
          &lt;Setter Property="ItemTemplate"&gt;
              &lt;Setter.Value&gt;
                  &lt;DataTemplate DataType="{x:Type model:Service}"&gt;
                      &lt;Border 
                          x:Name="border" 
                          VerticalAlignment="Center"
                          BorderThickness="0, 0, 0, 2"
                          BorderBrush="{StaticResource CommonBackgroundColor}"&gt;
                          &lt;view:ServiceUpDown/&gt;
                      &lt;/Border&gt;
                  &lt;/DataTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
          &lt;Setter Property="ItemsPanel"&gt;
              &lt;Setter.Value&gt;
                  &lt;ItemsPanelTemplate&gt;
                      &lt;UniformGrid Columns="2" HorizontalAlignment="Center"/&gt;
                  &lt;/ItemsPanelTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
          &lt;Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/&gt;
          &lt;Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>Thanks for any help.</p>