PaintValueEventArgs 類別

定義

提供 PaintValue(Object, Graphics, Rectangle) 方法的資料。Provides data for the PaintValue(Object, Graphics, Rectangle) method.

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

範例

下列程式碼範例方法會傳回 PaintValueEventArgs ,以提供在指定區域內繪製物件值的表示所需的資料:The following code example method returns a PaintValueEventArgs that provides the data needed to paint a representation of the value of an object within a given area:

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

備註

PaintValueEventArgs 提供所需的所有資訊 UITypeEditor ,以根據指定物件的值在區域內進行繪製,包括 Rectangle 應完成繪圖的,以及 Graphics 應完成繪圖的物件。PaintValueEventArgs provides all the information needed for a UITypeEditor to paint within an area based on the value of the specified object, including the Rectangle in which the drawing should be done and the Graphics object with which the drawing should be done.

建構函式

PaintValueEventArgs(ITypeDescriptorContext, Object, Graphics, Rectangle)

使用指定的值,初始化 PaintValueEventArgs 類別的新執行個體。Initializes a new instance of the PaintValueEventArgs class using the specified values.

屬性

Bounds

取得矩形,表示進行繪製的區域。Gets the rectangle that indicates the area in which the painting should be done.

Context

取得 ITypeDescriptorContext 介面,用來取得這個數值出現所在內容的其他相關資訊。Gets the ITypeDescriptorContext interface to be used to gain additional information about the context this value appears in.

Graphics

取得應繪製的 Graphics 物件。Gets the Graphics object with which painting should be done.

Value

取得要繪製的數值。Gets the value to paint.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於