Reputation: 1049
I am building silverlight navigation application in vs2010 , silverlight 4. My problem is that sometimes I need my label to have some background color. The first thing is that there no label in silverlight......... and the second thing is that everybody tell to use TextBlock instead but it doesn't have a background property....what control should I use? Or should I write my control? thanks...
Upvotes: 1
Views: 1686
Reputation: 5605
The improved equivalent of label in silverlight is TextBlock. To set its background color wrap it in some container like stackpanel, grid or border and set the container's background property.
<Border Background="Red" >
<TextBlock Text="Label text"/>
</Border>
Upvotes: 4