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


ITOCControl2.SetActiveView Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Controls)  

ITOCControl2.SetActiveView Method

Sets the ActiveView used to populate the TOCControl.

[Visual Basic .NET]
Public Sub SetActiveView ( _
    ByVal ActiveView As IActiveView _
)
[C#]
public void SetActiveView (
    IActiveView ActiveView
);
[C++]
HRESULT SetActiveView(
  IActiveView* ActiveView
);
[C++]

Parameters ActiveView [in]
ActiveView is a parameter of type IActiveView

Product Availability

Available with ArcGIS Engine.

Description

Use the method to set the ActiveView used by the TOCControl to populate itself with maps, layers and symbols. The ActiveView can be set to IMapControl2::ActiveView, IPageLayoutControl::ActiveView, ISceneControl::Scene or IGlobeControl::Globe. The SetActiveView method causes the Buddy to be set to Nothing.

Remarks

If a Buddy has been set the TOCControl will populate itself based on the ActiveView of the Buddy.

See Also

ITOCControl2 Interface