I have a listbox that’s binded to data, each item that’s in the listbox i would like to have rounded corners. I’ve used a border tag, but it doesn’t seem to be having any effect.
Here’s the code i’m using;
<ListBox Name="lstbMenu" Margin="0,190,6,6" Height="488">
<ListBox.ItemTemplate>
<DataTemplate>
<Border CornerRadius="10">
<StackPanel Orientation="Horizontal" Margin="10" Background="Beige" Width="488">
<StackPanel Orientation="Vertical">
<Image Source="Images/1_0_1_1B59_7DA_2_11A0000_0_0_0.png" VerticalAlignment="Center" Height="80" Width="80" Margin="10"/>
</StackPanel>
<TextBlock Text="{Binding Path=menuText}" VerticalAlignment="Center" Margin="10" FontSize="20" />
<TextBlock Text="{Binding Path=menuPage}" Visibility="Collapsed" />
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Does anyone have any idea’s?
Thanks
By default a
Borderhas a transparent background and a border thickness of 0. You need to set theBackground,BorderBrushandBorderThicknessproperties of theBorder.