Share via


PaintValueEventArgs Kelas

Definisi

Menyediakan data untuk metode ini PaintValue(Object, Graphics, Rectangle) .

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

Contoh

Metode contoh kode berikut mengembalikan PaintValueEventArgs yang menyediakan data yang diperlukan untuk melukis representasi nilai objek dalam area tertentu:

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

Keterangan

PaintValueEventArgs menyediakan semua informasi yang UITypeEditor diperlukan untuk dicat dalam area berdasarkan nilai objek yang ditentukan, termasuk Rectangle di mana gambar harus dilakukan dan Graphics objek tempat gambar harus dilakukan.

Konstruktor

PaintValueEventArgs(ITypeDescriptorContext, Object, Graphics, Rectangle)

Menginisialisasi instans PaintValueEventArgs baru kelas menggunakan nilai yang ditentukan.

Properti

Bounds

Mendapatkan persegi panjang yang menunjukkan area di mana lukisan harus dilakukan.

Context

Mendapatkan antarmuka yang ITypeDescriptorContext akan digunakan untuk mendapatkan informasi tambahan tentang konteks tempat nilai ini muncul.

Graphics

Graphics Mendapatkan objek dengan lukisan mana yang harus dilakukan.

Value

Mendapatkan nilai untuk dicat.

Metode

Equals(Object)

Menentukan apakah objek yang ditentukan sama dengan objek saat ini.

(Diperoleh dari Object)
GetHashCode()

Berfungsi sebagai fungsi hash default.

(Diperoleh dari Object)
GetType()

Mendapatkan instans Type saat ini.

(Diperoleh dari Object)
MemberwiseClone()

Membuat salinan dangkal dari yang saat ini Object.

(Diperoleh dari Object)
ToString()

Mengembalikan string yang mewakili objek saat ini.

(Diperoleh dari Object)

Berlaku untuk