0

I want to write something as that what I wrote in the title in a XAML attribute. I know I have a book in that it stays but its a really thick book and I dont find it anymore. Also I cant search it with Google, because it dont accept chars like < , > . ( ) and somemore. Help me please!

HenrikD
  • 241
  • 2
  • 10

1 Answers1

1

There are 4 special characters in XAML:

  1. <
  2. >
  3. &
  4. "

In order to use any one of these characters in a string literal (such as a TextBlock), use the W3C Xaml standard.

For example <TextBlock Text="&lt;&lt;"/> will produce a TextBlock that displays "<<" in the text field.

https://msdn.microsoft.com/en-us/library/aa970677%28v=vs.110%29.aspx

CurtisHx
  • 746
  • 3
  • 11
  • 30
  • Thank you. I have found another solution as well but that is not so good because it is working based on unicodecodes but yours is better. in addition the > isnt that special because you cam simply use it in attributes. – HenrikD Mar 12 '15 at 20:58