This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IP > IPageLayoutControlEvents Interface > IPageLayoutControlEvents.OnAfterDraw Event (ArcObjects .NET 10.5 SDK) |
Fires after the PageLayoutControl 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
The OnAfterDraw event is fired after a specified phase has been drawn and is based upon the IActiveViewEvents::AfterDraw event. You must query interface for the IDisplay interface and base the viewDrawPhase on the esriViewDrawPhase constants.
In some circumstances there maybe a need to execute some code after each individual element in a PageLayout has drawn. To do this you need to set the IViewManager::VerboseEvents property to true and use the IActiveViewEvents::AfterItemDraw event.
IViewManager viewManager=(IViewManager) axPageLayoutControl1.PageLayout;
viewManager.VerboseEvents=true;
Dim pViewManager As IViewManager
pViewManager=AxPageLayoutControl1.PageLayout
pViewManager.VerboseEvents=True