Click or drag to resize

ImageViewOnBeforeCustomPaint Event

This event is fired when the EnableCustomDrawing property is True, and the control is about to paint its content.

Namespace:  Kofax.OmniPageCSDK.ToolBoxes
Assembly:  Kofax.OmniPageCSDK.ToolBoxes (in Kofax.OmniPageCSDK.ToolBoxes.dll) Version: 1.0.0.0
Syntax
public event ImageViewBeforeCustomPaintHandler OnBeforeCustomPaint

Value

Type: Kofax.OmniPageCSDK.ToolBoxesImageViewBeforeCustomPaintHandler
Remarks

This event allows you to override or modify the default drawing implementation. Left, Top, Width and Height parameters hold the View coordinates of the rectangle being painted. DC contains the memory HDC which you can use to perform painting.

Painting is clipped to the rectangle specified by the Left, Top, Width and Height parameters, so any custom painting outside this rectangle will take no effect. When drawing to the passed HDC, always use View coordinates. To learn more about the different ImageView coordinate systems and the usage of this event, refer to the Coordinate Systems chapter of the documentation.

If the CancelDefaultDrawing parameter is set to False (or the event is not handled), the default implementation will run and your painting will be overwritten. Consequently, if you only want to perform some additional drawing over the default implementation, use AfterCustomPaint event instead. If this parameter is set to True, the ImageView will not draw its content at all. In this case the integrator is responsible to take care of painting the control content either in BeforeCustomPaint or AfterCustomPaint.

See Also