Парни, подскажите.
Имеется:
<ListBox Name="listBox" Padding="2" BorderThickness="0">
<ListBox.Template>
<ControlTemplate TargetType="ListBox">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
<ItemsPresenter />
</Border>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<DataTemplate.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="20"/>
</Style>
</DataTemplate.Resources>
<Grid Background="Beige">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="128" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Path=Number}" Grid.Column="0"/>
<TextBlock Text="{Binding Path=Time}" Grid.Column="1"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style>
<Setter Property="Control.Background" Value="Red" />
<Setter Property="Control.Padding" Value="16,8" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
Выглядит это дело так:
Вопрос:
Как сделать так, чтоб у ItemContainer'а (которые красные) были скругленные края? Пробовал через setter в стиле ItemContainer'a, но не получается