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&#x0a;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 &#x0d;&#x0a;

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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -