Dundas Chart for Windows Forms
PostPaint Event
See Also  Example Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > Chart Class : PostPaint Event


This event fires after a chart element is drawn.


Called when chart element is painted.

Syntax

Visual Basic (Declaration)  
Public Event PostPaint() As PaintEventHandler
Visual Basic (Usage) Copy Code
Dim instance As Chart
Dim handler As PaintEventHandler
 
AddHandler instance.PostPaint, handler
C#  
public event PaintEventHandler PostPaint()

Event Data

The event handler receives an argument of type ChartPaintEventArgs containing data related to this event. The following ChartPaintEventArgs properties provide information specific to this event.

Property Description
Chart

Gets the root Chart object.


Chart root object.
ChartGraphics

Gets a ChartGraphics object.


Chart graphics object.
Position

Gets an ElementPosition object.


Chart element position in relative coordinates.

Example

Visual Basic Copy Code
If Typeof Sender Is Dundas.Charting.WinControl.ChartArea Then
    ' do something
End If

Remarks

This event fires just prior to a chart element being drawn, and is raised once for the chart image, and one time for each ChartArea, Legend, Series and DataPoint objects that exist within the chart image (note that this event is not raised for Series and DataPoint objects for 3D charts).

To test what object the event was raised for use the following along with the code snippet above: ChartPicture, ChartArea, Legend, Series, and DataPoint (e.g. the sender object allows the developer to determine what chart element has raised this event).

To see how a chart painting event is implemented see the Custom Drawing Using the Painting Events topic.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2009 All Rights Reserved.