xaml - Newline in string attribute -
how can add line break text when being set attribute i.e.:
<textblock text="stuff on line1 \n stuff on line2" />
breaking out exploded format isn't option particular situation. need way emulate following:
<textblock> <textblock.text> stuff on line1 <linebreak/> stuff on line2 </textblock.text> <textblock/>
<textblock text="stuff on line1
stuff on line 2"/>
you can use hexadecimally encoded value represent literal. in case, used line feed (char 10). if want "classic" vbcrlf
, can use 

by way, note syntax: it's ampersand, pound, letter x, hex value of character want, , semi-colon.
also: completeness, can bind text has line feeds embedded in constant in code behind, or variable constructed @ runtime.
Comments
Post a Comment