C# – Silverlight: TextBlock has no Template property

cnetsilverlightstyles

I want to customize the look of a TextBlock. (I want a rounded rectangle border around it.)
But I'd like to be able to set its template via the file app.xaml.

But I see that TextBlock doesn't have a Template property. I'd use Label (which does have a Template property) but I guess Silverlight doesn't support a Label control.

So what can I use to do this?

Best Answer

One of the solutions I found for this rounding border of text box is available in Scott Guthrie's article:

alt text

http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-4-using-style-elements-to-better-encapsulate-look-and-feel.aspx