.NET Framework Class Library DataGridViewCell..::.Size Property Gets the size of the cell.
Namespace:
System.Windows.Forms
Assembly:
System.Windows.Forms (in System.Windows.Forms.dll)

Syntax
<BrowsableAttribute(False)> _
Public ReadOnly Property Size As Size
Get
[BrowsableAttribute(false)]
public Size Size { get; }
[BrowsableAttribute(false)]
public:
property Size Size {
Size get ();
}
[<BrowsableAttribute(false)>]
member Size : Size

Exceptions

Remarks
If the cell is not associated with a DataGridView control, the Size property returns a Size with a width and height of -1.

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0 .NET Framework Client ProfileSupported in: 4, 3.5 SP1

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

See Also
|
Biblioteca de clases de .NET Framework DataGridViewCell..::.Size (Propiedad) Obtiene el tamaño de la celda.
Espacio de nombres:
System.Windows.Forms
Ensamblado:
System.Windows.Forms (en System.Windows.Forms.dll)

Sintaxis
<BrowsableAttribute(False)> _
Public ReadOnly Property Size As Size
Get
[BrowsableAttribute(false)]
public Size Size { get; }
[BrowsableAttribute(false)]
public:
property Size Size {
Size get ();
}
[<BrowsableAttribute(false)>]
member Size : Size
Valor de propiedadTipo: System.Drawing..::.SizeSize establecido en el alto de la fila propietaria y el ancho de la columna propietaria.

Excepciones
| Excepción | Condición |
|---|
| InvalidOperationException | La fila que contiene la celda es una fila compartida. O bien La celda es una celda de encabezado de columna. |

Comentarios
Si la celda no está asociada a un control DataGridView, la propiedad Size devuelve una estructura Size con un ancho y un alto de -1.

Información de versión
.NET FrameworkCompatible con: 4, 3.5, 3.0, 2.0 .NET Framework Client ProfileCompatible con: 4, 3.5 SP1

Plataformas
Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Vea también
|