PaintValueEventArgs Class
.NET Framework 3.0
Provides data for the PaintValue method.
Namespace: System.Drawing.Design
Assembly: System.Drawing (in system.drawing.dll)
Assembly: System.Drawing (in system.drawing.dll)
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 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
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
- NamedPermissionSet for full access to system resources. Demand values: LinkDemand, InheritanceDemand. Associated state: FullTrust
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.Community Additions
ADD
Show: