本文整理汇总了C#中System.Windows.Documents.TableRowGroup.Rows属性的典型用法代码示例。如果您正苦于以下问题:C# TableRowGroup.Rows属性的具体用法?C# TableRowGroup.Rows怎么用?C# TableRowGroup.Rows使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了TableRowGroup.Rows属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Table
Table tbl = new Table();
TableRowGroup trg = new TableRowGroup();
tbl.RowGroups.Add(trg);
// Add rows to a TableRowGroup collection.
int rowsToAdd = 4;
for (int x = 0; x < rowsToAdd; x++)
trg.Rows.Add(new TableRow());
// Insert a new first row (at the zero-index position).
trg.Rows.Insert(0, new TableRow());
// Manipulate rows...
// Set the background on the first row.
trg.Rows[0].Background = Brushes.CornflowerBlue;
// Set the font size on the second row.
trg.Rows[1].FontSize = 24;
// Set a tooltip for the third row.
trg.Rows[2].ToolTip = "This row's tooltip";
// Adding cells to a row...
{
int cellsToAdd = 10;
for (int x = 0; x < cellsToAdd; x++)
trg.Rows[0].Cells.Add(new TableCell(new Paragraph(new Run("Cell " + (x + 1)))));
}
// Count rows.
int rows = trg.Rows.Count;
// Remove 1st row by reference.
trg.Rows.Remove(trg.Rows[0]);
// Remove all rows...
trg.Rows.Clear();