// example var myDoc = new FlowDocument(); foreach (MyDataObject dObj in dataFromDatabase) { var para = new Paragraph(); para.Inlines.Add(new Run(dObj.DataPoint1.ToString())); if (dObj.DataPoint2 > 3) { para.Inlines.Add(new Run("\nThis exceeds reporting threshold for blah, blah, blah,...")); // \n or \r it doesn't matter, they are both removed in copy/paste } // and other lines as required in the program logic myDoc.Blocks.Add(para); } myRichTextBox.Document = myDoc;
\r
\n
RichTextBox
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)