Export (0) Print
Expand All

PaintValueEventArgs Class

Provides data for the PaintValue method.

Namespace: System.Drawing.Design
Assembly: System.Drawing (in system.drawing.dll)

public class PaintValueEventArgs : EventArgs
public class PaintValueEventArgs extends EventArgs
public class PaintValueEventArgs extends EventArgs
Not applicable.

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.

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:

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 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;
} //CreatePaintValueEventArgs

System.Object
   System.EventArgs
    System.Drawing.Design.PaintValueEventArgs

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft