I need to display special characters in TextBlock from string in code.
<TextBlock x:Name="tboxData" TextWrapping="Wrap" Text=">> <<" />
is working, but I need to do it from c#:
tboxData.Text = ">> <<";
And this doesn’t print >> << in TextBlock.
How can I do it?
Assuming you might need to use encoded characters for some reason (perhaps you’re not using literals and are reading in an xml file or something):
Note that you’ll have to add a reference to the
System.Webassembly.