I am going to show you how you can modify the standard ListBox control used in Silverlight 2.0. Many people want to change the default view of this control but they can’t remove the line between the items. If you download the code of the Silverlight control from the official site of Microsoft you will see that after every item there is a line. In this example I will show you how you can remove this line.
Let’s create e new Silverlight 2.0 application and place a ListBox in it.
<ListBoxItem Content="I am the first item in the collection" />
<ListBoxItem Content="I am the second item in the collection" />
<!--more-->In order to change the default look of our items we have to modify the <a href="http://msdn2.microsoft.com/en-us/library/system.windows.controls.itemscontrol.itemcontainerstyle.aspx" target="_blank">ItemContainerStyle</a> property of out ListBox control.
<Setter Property="Background" Value="LightBlue" />