This project is read-only.

Multiline text box does not work


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


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




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