PaintValueEventArgs Clase

Definición

Proporciona datos para el método PaintValue(Object, Graphics, Rectangle).

public ref class PaintValueEventArgs : EventArgs
public class PaintValueEventArgs : EventArgs
type PaintValueEventArgs = class
    inherit EventArgs
Public Class PaintValueEventArgs
Inherits EventArgs
Herencia
PaintValueEventArgs

Ejemplos

El método de ejemplo de código siguiente devuelve un PaintValueEventArgs objeto que proporciona los datos necesarios para pintar una representación del valor de un objeto dentro de un área determinada:

PaintValueEventArgs^ CreatePaintValueEventArgs( System::ComponentModel::ITypeDescriptorContext^ context, Object^ value, Graphics^ graphics, Rectangle bounds )
{
   PaintValueEventArgs^ e = gcnew PaintValueEventArgs( context, value, graphics, bounds );
   // The context of the paint value event         e.Context
   // The Object representing the value to paint   e.Value
   // The graphics to use to paint                 e.Graphics
   // The rectangle in which to paint              e.Bounds
   return e;
}
public PaintValueEventArgs CreatePaintValueEventArgs(System.ComponentModel.ITypeDescriptorContext context, object value, Graphics graphics, Rectangle bounds)
{
    PaintValueEventArgs e = new PaintValueEventArgs(context, value, graphics, bounds);
    // The context of the paint value event         e.Context
    // The object representing the value to paint   e.Value
    // The graphics to use to paint                 e.Graphics
    // The rectangle in which to paint              e.Bounds                       
    return e;
}
Public Function CreatePaintValueEventArgs(ByVal context As System.ComponentModel.ITypeDescriptorContext, ByVal value As Object, ByVal graphics As Graphics, ByVal bounds As Rectangle) As PaintValueEventArgs
    Dim e As New PaintValueEventArgs(context, value, graphics, bounds)
    ' The context of the paint value event         e.Context
    ' The object representing the value to paint   e.Value
    ' The graphics to use to paint                 e.Graphics
    ' The rectangle in which to paint              e.Bounds                       
    Return e
End Function

Comentarios

PaintValueEventArgs proporciona toda la información necesaria para UITypeEditor pintar dentro de un área basándose en el valor del objeto especificado, incluido el Rectangle en el que se debe realizar el dibujo y el Graphics objeto con el que se debe realizar el dibujo.

Constructores

PaintValueEventArgs(ITypeDescriptorContext, Object, Graphics, Rectangle)

Inicializa una nueva instancia de la clase PaintValueEventArgs mediante los valores especificados.

Propiedades

Bounds

Obtiene el rectángulo que indica la zona en la que se debe dibujar.

Context

Obtiene la interfaz ITypeDescriptorContext que se va a utilizar para obtener información adicional sobre el contexto en el que aparece el valor.

Graphics

Obtiene el objeto Graphics con el que se debe dibujar.

Value

Obtiene el valor que se va a dibujar.

Métodos

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
MemberwiseClone()

Crea una copia superficial del Object actual.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Se aplica a