ArcObjects Library Reference (Controls)  

IMapControlEvents2.OnAfterDraw Event

Fires after the Map draws a specified view phase.

[Visual Basic .NET]
Public Event OnAfterDraw As OnAfterDrawEventHandler
[C#]
public event OnAfterDrawEventHandler OnAfterDraw
[C++]
HRESULT OnAfterDraw(
  VARIANT Display,
  long viewDrawPhase
);
[C++]

Parameters

Display [in]   Display is a parameter of type VARIANT viewDrawPhase [in]   viewDrawPhase is a parameter of type long

Product Availability

Available with ArcGIS Engine.

Description

The OnAfterDraw event is fired after a specified phase has been drawn on the Map's screen display and is based upon the IActiveViewEvents::AfterDraw event. You must query interface for the IDisplay interface and base the viewDrawPhase on the esriViewDrawPhase constants.

Remarks

In some circumstances there maybe a need to execute some code after each individual layer in a map has drawn. To do this you need to set the IViewManager::VerboseEvents property to true and use the IActiveViewEvents::AfterItemDraw event.

[C#]
IViewManager viewManager = (IViewManager) axMapControl1.Map;
viewManager.VerboseEvents = true;
[Visual Basic .NET]
Dim pViewManager As IViewManager
pViewManager = AxMapControl1.Map
pViewManager.VerboseEvents = True

See Also

IMapControlEvents2 Interface