本文整理匯總了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();