我需要插入
var f = new Floater
{
Padding = new Thickness(0, 0, 0, 0),
Margin = new Thickness(0, 0, 5, 0),
HorizontalAlignment = HorizontalAlignment.Left,
Width = 210
};
进入表格单元格
var table = myFlowDocument.Document.Blocks.FirstBlock as Table;
table.RowGroups[0].Rows[0].Cells[0].SetValue(???);
真的无法想象我们该怎么做。
还不清楚如何清洁细胞。
有任何线索吗?
谢谢!
答案 0 :(得分:1)
请参阅MSDN上Blocks
属性的文档:
var cell = table.RowGroups[0].Rows[0].Cells[0];
// Clear the content
cell.Blocks.Clear();
// Add some text
cell.Blocks.Add(new Paragraph(new Run("Hello world")));
// Add a floater
cell.Blocks.Add(new Paragraph(new Floater()));