既に SingleVertical CellBorderStyle があるため、残りのスペースを 1 つの大きな空白の最終行で埋めることができます。
//calculate the space already filled by column headers and rows
int currentContentHeight = Grid.ColumnHeadersHeight;
for (int i = 0; i < Grid.Rows.Count; i++)
{
currentContentHeight += Grid.Rows[i].Height;
}
//then calculate the space remaining
int remainingHeightToEndOfControl = Grid.Height - currentContentHeight;
//then fill it with one big blank final row:
if (remainingHeightToEndOfControl > 0)
{
Grid.Rows.Add();
Grid.Rows[Grid.Rows.Count - 1].Height = remainingHeightToEndOfControl;
}
コントロールの境界を考慮して、remainingHeight から 2 ポイントほど差し引く必要がある場合があります。