PaintValueEventArgs 類別

定義

提供 PaintValue(Object, Graphics, Rectangle) 方法的資料。

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

範例

下列程式代碼範例方法會傳回 , PaintValueEventArgs 提供繪製指定區域內物件值表示所需的數據:

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(ITypeDescriptorContext, Object, Graphics, Rectangle)

使用指定的值,初始化 PaintValueEventArgs 類別的新執行個體。

屬性

Bounds

取得矩形,表示進行繪製的區域。

Context

取得 ITypeDescriptorContext 介面,用來取得這個數值出現所在內容的其他相關資訊。

Graphics

取得應繪製的 Graphics 物件。

Value

取得要繪製的數值。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於