PaintValueEventArgs Klasa

Definicja

Udostępnia dane dla PaintValue(Object, Graphics, Rectangle) metody .

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

Przykłady

Poniższa przykładowa metoda kodu zwraca element PaintValueEventArgs , który dostarcza dane potrzebne do malowania reprezentacji wartości obiektu w danym obszarze:

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

Uwagi

PaintValueEventArgs zawiera wszystkie informacje potrzebne do UITypeEditor malowania obiektu w obrębie obszaru na podstawie wartości określonego obiektu, w tym Rectangle elementu, w którym należy wykonać rysunek, oraz Graphics obiektu, z którym należy wykonać rysunek.

Konstruktory

PaintValueEventArgs(ITypeDescriptorContext, Object, Graphics, Rectangle)

Inicjuje PaintValueEventArgs nowe wystąpienie klasy przy użyciu określonych wartości.

Właściwości

Bounds

Pobiera prostokąt wskazujący obszar, w którym ma zostać wykonany obraz.

Context

ITypeDescriptorContext Pobiera interfejs do użycia w celu uzyskania dodatkowych informacji na temat kontekstu, w jaki pojawia się ta wartość.

Graphics

Graphics Pobiera obiekt, za pomocą którego należy wykonać malowanie.

Value

Pobiera wartość do malowania.

Metody

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetType()

Type Pobiera bieżące wystąpienie.

(Odziedziczone po Object)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)

Dotyczy