ImageView.OnBeforeCustomPaint Event |
Namespace: Kofax.OmniPageCSDK.ToolBoxes
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.