nijwons
nijwons

Reputation: 305

Xamarin.forms putting default text in editor class on multiple lines

Essentially, I want to put multiple lines of text in one Editor class, a template of sorts.

I have tried just putting the plaintext of what I want in but it comes out in one line.

<Editor 

Text="
Dear Blank,
How are you today?
I'm fine if you were wondering" />

I would like the text entry to have

Dear Blank,
How are you today?
I'm fine if you were wondering

But it comes out as

Dear Blank, How are you today? I'm fine if you were wondering

In the text entry box/ editor class in my app.

Upvotes: 1

Views: 281

Answers (1)

Leo Zhu
Leo Zhu

Reputation: 15011

as

\r, CR: &#13;
\n, LF: &#10;

The easiest way you could change your text like this:

<Editor 
     Text="Dear Blank,&#10;How are you today?&#10;I'm fine if you were wondering"/>

add &#10; behind the string which you want

Upvotes: 0

Related Questions