If you want the Border in the ListBoxItems have a different CornerRadius value, you can either reformat the ListBoxItem where the Border is specified, or set it implicitly in the ItemContainerStyle Resources
<ListBox ...> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Style.Resources> <Style TargetType="Border"> <Setter Property="CornerRadius" Value="5"/> </Style> </Style.Resources> </Style> </ListBox.ItemContainerStyle> </ListBox>
Edit: If you want to install CornerRadius for a ListBox , you can do the same, but in Resources instead
<ListBox ...> <ListBox.Resources> <Style TargetType="Border"> <Setter Property="CornerRadius" Value="10"/> </Style> </ListBox.Resources> </ListBox>
Fredrik hedblad
source share