title: How To Style ListBoxItem
body: <pre><code>&lt;Border Grid.Row="1" Padding="15" Margin="15" BorderBrush="LightBlue" Background="AliceBlue" BorderThickness="1"&gt;
          &lt;ListBox ItemsSource="{Binding Configs}"&gt;
              &lt;ListBox.ItemContainerStyle&gt;
                  &lt;Style TargetType="{x:Type ListBoxItem}"&gt;
                      &lt;Setter Property="Background" Value="Transparent" /&gt;
                      &lt;Setter Property="Focusable" Value="False" /&gt;
                      &lt;Setter Property="BorderThickness" Value="0" /&gt;
                  &lt;/Style&gt;
              &lt;/ListBox.ItemContainerStyle&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;view:Config /&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt;
      &lt;/Border&gt;
  </code></pre>
  
  <p>This is the code I've written in XAML. However, it doesn't appear to affect anything.</p>
  
  <p>There are so many posts on SO with similar questions but all of their response are "use <code>ListBox.ItemContainerStyle</code>" which I've done :S Such as <a href="https://stackoverflow.com/questions/1398559/there-is-no-listbox-selectionmode-none-is-there-another-way-to-disable-select">There is no ListBox.SelectionMode=&quot;None&quot;, is there another way to disable selection in a listbox?</a> and <a href="https://stackoverflow.com/questions/1305157/wpf-xaml-how-to-style-a-listboxitem-using-binding-on-property-of-listbox-items">WPF, XAML: How to style a ListBoxItem using binding on property of ListBox ItemsSource object?</a></p>
  
  <p>What I would expect is that there is no background, no border and the item is not focusable.</p>
  
  <p>What have I done wrong?</p>