I have listbox with a TextBlock bound to a field, and the I have set the AlternationCount="2" this works great for changing the background color of the items control; however, I cannot get the effect I want with my rectangle... I'm trying to have a rounded corners effect on each listbox item.
edit: the xaml
<DataTemplate x:Key="TaskListTemplate">
<Grid Height="276" Width="Auto">
<Rectangle Fill="Gray" Stroke="Black" RadiusX="8" RadiusY="8" Margin="0"/>
<TextBox x:Name="txtDescription" Text="{Binding Path=Des}" />
<TextBox x:Name="txtComments" Text="{Binding Path=Com}"/>
<Label Content="{Binding Path=Title}">
</Grid>
</DataTemplate>
<ListBox Margin="8,37,0,6"
ItemContainerStyle="{DynamicResource ListBoxItemStyle}"
AlternationCount="2"
ItemTemplate="{DynamicResource TaskListTemplate}"/>
<Style x:Key="ListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="FontSize" Value="12" />
<Setter Property="FontFamily" Value="Tahoma" />
<Setter Property="Background" Value="#006C3B3B"/>
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF533F70"/>
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#FF533F70"/>
<Storyboard x:Key="MouseOverStoryBoard">
<ColorAnimationUsingKeyFrames AutoReverse="True" BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
<SplineColorKeyFrame KeyTime="00:00:00" Value="#FFF48F21"/>
<SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FF4A475C"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</Style.Resources>
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="#FFA2BAD4"/>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="#FF7395B9"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource MouseOverStoryBoard}"/>
</Trigger.EnterActions>
<Setter Property="Foreground" Value="White" />
<Setter Property="Background" Value="#FFF48F21"/>
<Setter Property="FontStyle" Value="Normal"/>
</Trigger>
</Style.Triggers>
</Style>