DataGridViewImageCell.GetPreferredSize(Graphics, DataGridViewCellStyle, Int32, Size) DataGridViewImageCell.GetPreferredSize(Graphics, DataGridViewCellStyle, Int32, Size) DataGridViewImageCell.GetPreferredSize(Graphics, DataGridViewCellStyle, Int32, Size) Method

Definición

Calcula el tamaño preferido, en píxeles, de la celda.Calculates the preferred size, in pixels, of the cell.

protected:
 override System::Drawing::Size GetPreferredSize(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex, System::Drawing::Size constraintSize);
protected override System.Drawing.Size GetPreferredSize (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex, System.Drawing.Size constraintSize);
override this.GetPreferredSize : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int * System.Drawing.Size -> System.Drawing.Size

Parámetros

graphics
Graphics Graphics Graphics

Graphics que se utiliza para dibujar la celda.The Graphics used to draw the cell.

cellStyle
DataGridViewCellStyle DataGridViewCellStyle DataGridViewCellStyle

DataGridViewCellStyle que representa el estilo de la celda.A DataGridViewCellStyle that represents the style of the cell.

rowIndex
Int32 Int32 Int32

Índice de base cero de la fila de la celda.The zero-based row index of the cell.

constraintSize
Size Size Size

El tamaño máximo permitido de la celda.The cell's maximum allowable size.

Devoluciones

Size que representa el tamaño preferido, en píxeles, de la celda.A Size that represents the preferred size, in pixels, of the cell.

Se aplica a

Consulte también: