Silverlight display special characters

June 3, 2010 at 11:45 PMdsoltesz

I wanted to diplay an ampersand (&) in the text of a textblock.  At first I tried this

<TextBlock Text="Folders & Files"/>

 but visual studio gave me an error

If you change the code to

<TextBlock Text="Folders &amp; Files"/>


everything words fine and visual studio is happy

Other special character encodings are

Character

Encoding

&

&amp;

&quot;

<

&lt;

>

&gt;

space

&#160;

&apos;

Posted in: silverlight

Tags: ,

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading