string error = null;
TableNode tn = this.xamRichTextEditor1.Document.InsertTable(0, 3, 2, out error);
if (error == null)
{
int cRow = 1;
foreach (TableRowNode trn in tn.ChildNodes)
{
int cCell = 1;
foreach (TableCellNode tcn in trn.ChildNodes)
{
ParagraphNode pn = tcn.ChildNodes[0] as ParagraphNode;
pn.SetText(string.Format("Row {0}, Cell {1}", cRow, cCell));
cCell++;
}
cRow++;
}
}