Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight: TextBlock has no Template property?

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?

like image 462
Shai UI Avatar asked May 11 '10 17:05

Shai UI


1 Answers

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

like image 175
Pranay Rana Avatar answered Oct 14 '22 07:10

Pranay Rana