PaintValueEventArgs 类   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为 PaintValue(Object, Graphics, Rectangle) 方法提供数据。
public ref class PaintValueEventArgs : EventArgspublic class PaintValueEventArgs : EventArgstype PaintValueEventArgs = class
    inherit EventArgsPublic Class PaintValueEventArgs
Inherits EventArgs- 继承
示例
下面的代码示例方法返回一个 , 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) |