title: Removing left and right border sides from listbox datatemplate
body: <p>Currently I have specified borders for all datatemplated items in my horizontal listbox which is fine because I DO want borders for all individual listboxitems, but I would like to remove the left border from the first item and the right border from the last item.  Is this even possible?</p>
  
  <p>Xaml:</p>
  
  <pre><code>&lt;ListBox.ItemTemplate&gt;
    &lt;DataTemplate&gt;
      &lt;StackPanel Orientation="Vertical" Background="DimGray"&gt;
        &lt;Border BorderBrush="White" BorderThickness="1"&gt;
          &lt;Canvas Height="80" Width="140"&gt;
            &lt;TextBlock Text="{Binding Name}" TextAlignment="Center" Canvas.Top="22" Height="80" Width="140" FontSize="26"&gt;&lt;/TextBlock&gt;
          &lt;/Canvas&gt;
        &lt;/Border&gt;
      &lt;/StackPanel&gt;
    &lt;/DataTemplate&gt;
  &lt;/ListBox.ItemTemplate&gt;
  </code></pre>
  
  <p>Thanks</p>