I have the following issue: I am trying to create a bullet list and at some point I want to control on adding a new line.
Bullets are added at paragraph level so I am trying to concatenate a new line into that paragraph.
- Code: Select all
tp.TextRanges.Append(new TextRange(Environment.NewLine));
TextBulletType bulletType;
tp.BulletType = bulletType;
tp.CustomBulletColor = true;
tp.BulletColor.Color = Util.GetColor(bulletColor);
tp.BulletSize = 100f;
tp.Depth = bulletIndentLevel;
On a windows machine the result looks good, however if you run this in a docker container with linux OS the result shows an additional bullet added for each new line (see attachments). New line is already based on environment as far as i know so it should be adding \r\n for windows and \n for linux. (I tried to add those by myself just to make sure.)
Is there any way to simulate a ctrl+enter? Adding a new line with no bullet? (I would avoid adding an additional paragraph if possible).