Well, I also had this code with start tags (I did not write it, and I can’t remember where it came from, so I won’t be grateful for it). Is that not so?
int blockCount = 0;
int lineCount = 0;
foreach (Block b in myRTB.Blocks)
{
if (b is Paragraph)
{
p = new Paragraph();
p = b as Paragraph;
foreach (Run run in p.Inlines)
{
lineCount++;
}
blockCount++;
}
}
source
share