DataGridViewCell.Size DataGridViewCell.Size DataGridViewCell.Size DataGridViewCell.Size Property

定义

获取单元格的大小。Gets the size of the cell.

public:
 property System::Drawing::Size Size { System::Drawing::Size get(); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Size Size { get; }
member this.Size : System.Drawing.Size
Public ReadOnly Property Size As Size

属性值

已设置为所属行高度和所属列宽度的 SizeA Size set to the owning row's height and the owning column's width.

异常

包含该单元格的行是共享行。The row containing the cell is a shared row.

- 或 --or- 该单元格是列标题单元格。The cell is a column header cell.

注解

如果该单元格不与相关联DataGridView控件,Size属性返回Size的宽度和高度为-1。If the cell is not associated with a DataGridView control, the Size property returns a Size with a width and height of -1.

适用于

另请参阅