Sugerir traducción
 
Otros han sugerido:

progress indicator
No hay más sugerencias.
Evaluar y enviar comentarios
Contraer todo/Expandir todo Contraer todo
Ver contenido:  en paraleloVer contenido: en paralelo
.NET Framework Class Library
DataGridViewCell..::.PreferredSize Property

Gets the size, in pixels, of a rectangular area into which the cell can fit.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
Visual Basic
<BrowsableAttribute(False)> _
Public ReadOnly Property PreferredSize As Size
    Get
C#
[BrowsableAttribute(false)]
public Size PreferredSize { get; }
Visual C++
[BrowsableAttribute(false)]
public:
property Size PreferredSize {
    Size get ();
}
F#
[<BrowsableAttribute(false)>]
member PreferredSize : Size

Property Value

Type: System.Drawing..::.Size
A Size containing the height and width, in pixels.
ExceptionCondition
InvalidOperationException

ColumnIndex is less than 0, indicating that the cell is a row header cell.

ArgumentOutOfRangeException

The row containing the cell is a shared row.

-or-

The cell is a column header cell.

The PreferredSize property returns the natural size of the cell computed by the cell's owning row and column. PreferredSize returns a Size with a width and height of -1 if the cell is not contained in a table.

If the cell is in a DataGridViewColumn that has its Resizable property set to false, -1 is returned for the width.

This method relies on the GetFormattedValue method.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.
Biblioteca de clases de .NET Framework
DataGridViewCell..::.PreferredSize (Propiedad)

Obtiene el tamaño, en píxeles, de un área rectangular en la que cabe la celda.

Espacio de nombres:  System.Windows.Forms
Ensamblado:  System.Windows.Forms (en System.Windows.Forms.dll)
Visual Basic
<BrowsableAttribute(False)> _
Public ReadOnly Property PreferredSize As Size
    Get
C#
[BrowsableAttribute(false)]
public Size PreferredSize { get; }
Visual C++
[BrowsableAttribute(false)]
public:
property Size PreferredSize {
    Size get ();
}
F#
[<BrowsableAttribute(false)>]
member PreferredSize : Size

Valor de propiedad

Tipo: System.Drawing..::.Size
Size que contiene el alto y el ancho, en píxeles.
ExcepciónCondición
InvalidOperationException

ColumnIndex es menor que 0, lo que indica que la celda es una celda de encabezado de fila.

ArgumentOutOfRangeException

La fila que contiene la celda es una fila compartida.

O bien

La celda es una celda de encabezado de columna.

La propiedad PreferredSize devuelve el tamaño natural de la celda calculado por la fila y columna propietarias de la celda. Si la celda no está incluida en una tabla, PreferredSize devuelve una estructura Size con un ancho y un alto de -1.

Si la celda está en una columna DataGridViewColumn cuya propiedad Resizable está establecida en false, se devuelve -1 para el ancho.

Este método se basa en el método GetFormattedValue.

.NET Framework

Compatible con: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Compatible con: 4, 3.5 SP1

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.
Contenido de la comunidad   ¿Qué es Community Content?
Agregar contenido nuevo RSS  Anotaciones
Processing
© 2012 Microsoft. Reservados todos los derechos. Términos de uso | Marcas Registradas | Privacidad
Page view tracker