Noob question on overriding m:ui default styles PLEASE help!

Oct 31, 2013 at 5:03 AM
Hi, Hope this is easy to answer...

I want to make my ListBoxItems' Background="White". No matter what I try, they are transparent.
I feel like the m:ui default to "Transparent" is not capable of being changed by local resource style setters.

Do I need to go to the ResourceDictionary and do something?
Sorry for the noob question. Thanks!
Mark

Here's the code that doesn't work.. the listboxitems come out transparent instead of occluding the red:

<StackPanel Background="Red">
<ListBox Background="Transparent" BorderBrush="Transparent">
    <ListBox.Resources>
        <Style TargetType="{x:Type ListBoxItem}">
            <Setter Property="Background" Value="White" />
            <Setter Property="Margin" Value="1" />
        </Style>
    </ListBox.Resources>
    <ListBoxItem Content="First Item"/>
    <ListBoxItem Content="Secton Item"/>
</ListBox>
</StackPanel>