editor not adding "\n" when wrapping line

BenjaminTooleBenjaminToole USMember ✭✭✭

I want the editor in my Xamarin forms project to add "/n" each line it wraps in the editor. The only way it adds it now is if i press enter.
How can I access this?

Best Answer

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited November 2017

    Why would you want that? It defies decades of normal behavior for "word wrap". It would make the text specific to the particulars of that device... Font size, screen size, user accessibility screen magnification setting...

    Do you really
    want to see test disp-
    layed like this if
    it gets openeed on
    a different device than
    the one that created
    it?

    Or even just from the
    screen rotating from
    portrait to land-
    scape?

  • BenjaminTooleBenjaminToole USMember ✭✭✭
    edited November 2017

    Forget i even mentioned adding "/n". Better Question: Is there a "OnLineWrap" sort of event when the editor wraps a line?> @ClintStLaurent said:

    Why would you want that? It defies decades of normal behavior for "word wrap". It would make the text specific to the particulars of that device... Font size, screen size, user accessibility screen magnification setting...

    Do you really
    want to see test disp-
    layed like this if
    it gets openeed on
    a different device than
    the one that created
    it?

    Or even just from the
    screen rotating from
    portrait to land-
    scape?

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Is there a "OnLineWrap" sort of event when the editor wraps a line?

    Still sounds like your trying to micro-manage the text. What is it you are trying to accomplish? What is the end goal of all this?

    Thinking about such an event. If you had 12k of text in an editor... and you rotate from landscape to portrait... I'm guessing about 250,000 events would trigger as all that text re-wrapped - give or take the nature of the text and if you're on a phone versus tablet - etc. Is that really something you think you need to take on?

  • BenjaminTooleBenjaminToole USMember ✭✭✭

    @ClintStLaurent said:

    Is there a "OnLineWrap" sort of event when the editor wraps a line?

    Still sounds like your trying to micro-manage the text. What is it you are trying to accomplish? What is the end goal of all this?

    Thinking about such an event. If you had 12k of text in an editor... and you rotate from landscape to portrait... I'm guessing about 250,000 events would trigger as all that text re-wrapped - give or take the nature of the text and if you're on a phone versus tablet - etc. Is that really something you think you need to take on?

    Im trying to auto resize the editor when a new line of text is added to the editor. Like in the ios messanger app. It resizes when i press enter and create a new line, but does nothing when the text reaches the end of the editor. If I had a way to notify when the text reaches the end, I could pop in a "/n". Any other solutions?

  • BenjaminTooleBenjaminToole USMember ✭✭✭

    That worked perfectly, thank you!

Sign In or Register to comment.