This document is archived and information here might be outdated.  Recommended version.


ITOCBuddyEvents.ActiveViewReplaced Event (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Controls)  

ITOCBuddyEvents.ActiveViewReplaced Event

Notifies the TOC that the active view has been replaced.

[Visual Basic .NET]
Public Event ActiveViewReplaced As ActiveViewReplacedEventHandler
[C#]
public event ActiveViewReplacedEventHandler ActiveViewReplaced
[C++]
HRESULT ActiveViewReplaced(
  IActiveView* pNewActiveView
);
[C++]

Parameters pNewActiveView [in]
pNewActiveView is a parameter of type IActiveView*

Product Availability

Available with ArcGIS Engine.

Description

The ActiveViewReplaced event is triggered when the ActiveView of the ITOCControl::Buddy is replaced.

For example, when a new map document is loaded into the MapControl the IActiveView object contained within the MapControl gets replaced. If the MapControl is 'buddied' to a TOCControl, the MapControl fires the ITOCBuddyEvents::ActiveViewReplaced event to the TOCControl. The TOCControl stops listening to events on the 'old' IActiveView object and starts listening to events on the 'new' IActiveView object contained within the MapControl. This ensures the TOCControl automatically reflects the maps, layers and symbology of the Buddy.

See Also

ITOCBuddyEvents Interface