PaintValue イベントのデータを提供します。
この型のすべてのメンバの一覧については、PaintValueEventArgs メンバ を参照してください。
System.Object
System.EventArgs
System.Drawing.Design.PaintValueEventArgs
Public Class PaintValueEventArgs
Inherits EventArgs
[C#]
public class PaintValueEventArgs : EventArgs
[C++]
public __gc class PaintValueEventArgs : public EventArgs
[JScript]
public class PaintValueEventArgs extends EventArgs
スレッドセーフ
この型の public static (Visual Basicでは Shared) のすべてのメンバは、マルチスレッド操作で安全に使用できます。インスタンスのメンバの場合は、スレッドセーフであるとは限りません。
解説
PaintValueEventArgs は、指定されたオブジェクトの値に基づいた領域内で UITypeEditor が描画を行うために必要な情報 (描画領域を示す Rectangle や描画に使用する Graphics オブジェクトなど) をすべて提供します。
使用例
[Visual Basic, C#, C++] PaintValueEventArgs を返すメソッドの例を次に示します。これは、オブジェクトの値が表す内容を、指定した領域内に描画するために必要なデータを提供します。
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
[C#]
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;
}
[C++]
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;
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
名前空間: System.Drawing.Design
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
アセンブリ: System.Drawing (System.Drawing.dll 内)