0

The following code is an example usage of String object using XAML with newline attempt:

xmlns:system="clr-namespace:System;assembly=mscorlib"
...
<system:String x:Key="Add">Add\nNew Item</system:String>

Thanks.

Eido95
  • 1,313
  • 1
  • 15
  • 29
  • I know it is a little obvious but have you tried breaking the line? I think xaml respects the line breaks and spaces inside the value of tags... – Marcelo de Aguiar Oct 30 '15 at 17:32
  • Check out this answer http://stackoverflow.com/a/3974049/525138 – Dutts Oct 30 '15 at 17:34
  • Thank you very much Richard, your link answer worked for me. The key for the answer is `xml:space="preserve"` – Eido95 Oct 30 '15 at 17:42

1 Answers1

0
&#x0a;

Use that in your string as described here:

Newline in string attribute

Community
  • 1
  • 1
Harvey
  • 1,320
  • 3
  • 13
  • 33