Paint Event
See Also 
Xceed.Grid Assembly > Xceed.Grid Namespace > VisualGridElement Class : Paint Event

Raised after the grid element's background and foreground have been painted.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Raised after the grid element's background and foreground have been painted.")>
<CategoryAttribute("Appearance")>
Public Event Paint() As GridPaintEventHandler
C# 
[DescriptionAttribute("Raised after the grid element's background and foreground have been painted.")]
[CategoryAttribute("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
BottomBorderWidth Gets the width needed to draw the bottom border (if one is required) of the DetailGrid objects.
ClientPosition Gets the position of the grid's ClientRectangle in grid coordinates.
ClientRectangle 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.
DisplayRectangle 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.
DisplayVisualStyle Gets the display visual style of the grid element.
Graphics Gets the Graphics object used to paint.
Printing 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 VisualGridElement.PointToClient should not be used.

Requirements

Target Platforms: Windows 2000 Service Pack 3; Windows 98; Windows 98 Second Edition; Windows ME; Windows Server 2003; Windows Vista Business; Windows Vista Business 64-bit edition; Windows Vista Enterprise; Windows Vista Enterprise 64-bit edition; Windows Vista Home Basic; Windows Vista Home Basic 64-bit edition; Windows Vista Home Premium; Windows Vista Home Premium 64-bit edition; Windows Vista Starter; Windows Vista Ultimate; Windows Vista Ultimate 64-bit edition; Windows XP Service Pack 2

Supported Frameworks: Microsoft .NET Framework version 2.0; Microsoft .NET Framework version 3.0

See Also