Line return characters in EditControl text

WPF EditControl automatically changes  “\r” to “\r\n”, I need to retain the “\r” and not have it changed to “\r\n”.
Is there an option to control that behavior ?

8 Replies

UN Unknown Syncfusion Team February 13, 2020 10:43 AM UTC

Hi Steve, 

Thanks for contacting Syncfusion support. 

We have checked your “Need to retain “\r” not changed to “\r\n”. Please refer the following, 

  1. “\r” in both MS  and our editors behaves the same i.e. creates a new row in same line.
  2. Can you please let us know what operation you indent to perform by using “\r”? Do you intend to add new row in same line as shown in below screenshot? If so , currently this support is not completely usable. This support will be completed and updated in any of upcoming releases.

Regards, 
Niranjan Kumar 



SM Steve McWilliams February 13, 2020 03:18 PM UTC

Our application edits text files that can come from various OS platforms - Windows, Unix, Linux, etc.
These files are used for machine control purposes and need to preserve contents exactly (except as explicitly changed in text editor).

We have a control on the screen that allows user to choose which EOL character sequence to insert into the text when Enter key is pressed.
This is so the file can be edited in Windows client, but remain consistent with intended platform once changes are saved.
We intercept Enter key and insert what we want as end-of-line chars. That's working OK.

But it seems that EditControl is automatically changing all our end-of-line chars whenever any change is made to text.
So we have to go back through and change them all back to original values.

We were just wondering if there's an option to avoid the automatic changing of end-of-line chars.
Basic WPF TextBox doesn't seem to do this automatic changing.


UN Unknown Syncfusion Team February 14, 2020 01:33 PM UTC

Hi Steve, 

Thanks for your update. 

We have checked your query “Need to retain “\r” not changed to “\r\n”. But we are unable to reproduce the reported query. When the text is changed , the “\n ” is changed to “\r\n”, but the “\r” remains unchanged. Please refer the below video reflecting the same. If we are missing any details or information regarding this query please let us know. 

 
Regards, 
Niranjan Kumar 



SM Steve McWilliams February 14, 2020 03:08 PM UTC

We need to retain "\n" also.
In your video that was changed to "\r\n"


AI Anirudhan Iyyappan Syncfusion Team February 17, 2020 11:59 AM UTC

Hi Steve,

Thanks for contacting syncfusion.

Query 1 : WPF EditControl automatically changes “\r” to “\r\n”, I need to retain the “\r” and not have it changed to “\r\n”. 

We are unable to reproduce this behavior in EditControl. Could you please let us know in which scenario this issue reproduces? Upon your information we will let you know further details in this.

Query 2 : We need to retain "\n" also. In your video that was changed to "\r\n" 

We are able to reproduce the reported issue. We confirm this as a defect and logged a bug report. We will fix this issue in volume one release. Meanwhile, you can track the status of the bug report through our below feedback link.

Feedback link: https://www.syncfusion.com/feedback/12138/editcontrol-automatically-changes-newline-constant-n-to-r-n  

Regards,
Anirudhan 



SM Steve McWilliams February 18, 2020 02:41 PM UTC

Thanks. I will wait for March release



SK Senthil Kumaran Rajan Syncfusion Team February 19, 2020 04:55 AM UTC

Hi Steve,

Thank you for your update.

We will let you know once our Volume 1, 2020 has been rolled out. Please let us know if you need further assistance.

Regards,
Senthil


UN Unknown Syncfusion Team April 2, 2020 10:17 AM UTC

Hi Steve, 
 
Thanks for your patience. 
 
We are glad to announce that our Essential Studio Volume 1, 2020 release (v18-1-0-42) is rolled out and is available for download under the following link. 
 
 
We thank you for your support and appreciate your patience in waiting for this release. We will provide patch in this version including all fixes provided to you by end of this week. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Niranjan Kumar 
 


Loader.
Up arrow icon