ArcObjects Library Reference (Carto)  

IGraphicsLayer Interface

Provides access to members that control the Graphics Layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

When To Use

A graphics layer can be associated with another layer in the map; when that other layer changes visibility, the graphics layer can change visibility also. Use the IGraphicsLayer interface to manage this.

The IGraphicsLayer interface also has methods to activate and deactivate the graphics layer. When a graphics layer is active, it is the current annotation target.

Members

Description
Method Activate Prepare to display graphic on screen.
Read/write property AssociatedLayer Layer that is associated with this graphics layer.
Method Deactivate ActiveView that graphics are displayed on is no longer visible.
Read/write property UseAssociatedLayerVisibility Indicates if the layer that is associated with this graphics layer controls the visibility.

CoClasses that implement IGraphicsLayer

CoClasses and Classes Description
CompositeGraphicsLayer A collection of graphics layers that behave like single layer.
FDOGraphicsLayer A collection of properties for an annotation layer (feature data object graphics layer).
GlobeGraphicsLayer (esriGlobeCore) The Globe Graphics Layer.
GraphicsLayer3D (esri3DAnalyst) A 3D Graphics Layer.
GraphicsSubLayer Graphic sublayer handed back by the composite graphics layer.

See Also

IMap Interface

.NET Samples

Graphics layers ToolControl (Code Files: NewGraphicsLayerCmd) | Subset network evaluators (Code Files: AutoUpdateNetworkElementArrayParametersCommand) |

.NET Related Topics

How to add different types of layers to a map |