This project is read-only.
3
Vote

Multiline text box does not work

description

I have a Content Control where allowing carriage returns is true. When writing more than two lines to this control causes carriage return/line feeds to be inserted where there are none in the source data. See attached Word doc for example. Please help!!!

file attachments

comments

realflash wrote Jul 5, 2013 at 9:03 AM

I too have this problem.

Setting this content:
"string1" + Environment.NewLine + "string2" + Environment.NewLine + "string3"

results in

"string1
string2

string3

"

This is because the code in OpenXmlHelper.cs inside SetContentOfContentControl() treats Environment.NewLine as though it is one character, even though it is in fact two. Please find the fix attached. I am not the developer of this project.

wrote Jul 5, 2013 at 9:07 AM

realflash wrote Jul 5, 2013 at 9:07 AM

I have attached a patch file for the benefit of the dev

wrote Jul 5, 2013 at 9:07 AM

wrote Sep 24, 2014 at 5:27 AM