Friday, August 13, 2010

Silverlight: Blank Line in TextBlock


This will be a relatively short one. I just wanted to post this out there in case anyone is wondering how to do this.There are several ways to create a blank line within a single textblock (or label) in Silverlight. The simplest is to use these special characters:

So, the following xaml

<TextBlock Text="hello&#xd;&#xa;world"/>

produces this text block


No comments:

Post a Comment