[英]WPF add Paragraph into TableCell by code
如何通過代碼將兩個Paragraph
添加到TableCell
? 在XAML中,
<TableCell>
<Paragraph>first</Paragraph>
<Paragraph>second</Paragraph>
</TableCell>
在代碼中,我可以這樣
TableCell firstCell = new TableCell(new Paragraph(new Run("first")));
嘗試添加到TableCell的塊中
看看MSDN TableCell.Blocks
理想情況下,它看起來像這樣
//I did not test this code
TableCell firstCell = new TableCell();
firstCell.Blocks.Add(new Paragraph(new Run("first")));
希望對您有所幫助!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.