Xceed Grid for WinForms v4.3 Documentation
Paint Event (VisualGridElement)


Xceed.Grid.v4.3 Assembly > Xceed.Grid Namespace > VisualGridElement Class : Paint Event
Raised after the grid element's background and foreground have been painted.
Syntax
'Declaration
 
<DescriptionAttribute("Raised after the grid element's background and foreground have been painted.")>
<CategoryAttribute("Appearance")>
Public Event Paint As GridPaintEventHandler
'Usage
 
Dim instance As VisualGridElement
Dim handler As GridPaintEventHandler
 
AddHandler instance.Paint, handler
[Description("Raised after the grid element's background and foreground have been painted.")]
[Category("Appearance")]
public event GridPaintEventHandler Paint
Event Data

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

PropertyDescription
Gets the width needed to draw the bottom border (if one is required) of the DetailGrid objects.  
Gets the position of the grid's ClientRectangle in grid coordinates.  
Gets the client rectangle of the grid element. The rectangle represents the visible portion of the grid element and is in client coordinates. The X and Y coordinates are always 0,0.  
Gets the display rectangle of the grid element. The rectangle is in client coordinates and the X and Y coordinates can be negative if the grid is scrolled.  
Gets the display visual style of the grid element.  
Gets the Graphics object used to paint.  
Gets a boolean value indicating if the element is being printed.  
Remarks

Painting must be done with the rectangles received in the GridPaintEventArgs otherwise the grid element will not print correctly.

When painting, the point conversion methods such as PointToClient should not be used.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also