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


IGraphicsContainer Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IG > IGraphicsContainer Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IGraphicsContainer Interface

Provides access to members that control the Graphics Container.

Product Availability

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

When To Use

Objects which manage a collection of graphic elements implement this interface.  For example, the PageLayout, Map, and FDOGraphicsLayer object all implement this interface to provide access to the graphic elements they manage.  

The PageLayout object contains a collection of Element objects including, MapFrames, MapSurroundFrames, and  GraphicElements such as the PictureElement, MarkerElement and LineElement.  The members of this interface provide access to the Elements.

When using this interface to add elements to layer types that operate in a corrdinate system, such as FDOGraphicsLayer and CompositeGraphicsLayer, the elements must implement IGraphicElement.

 

Members

Name Description
Method AddElement Add a new graphic element to the layer.
Method AddElements Add new graphic elements to the layer.
Method BringForward Move the specified elements one step closer to the top of the stack of elements.
Method BringToFront Make the specified elements draw in front of all other elements.
Method DeleteAllElements Delete all the elements.
Method DeleteElement Delete the given element.
Method FindFrame Find the frame that contains the specified object.
Method GetElementOrder Private order object. Used to undo ordering operations.
Method LocateElements Returns the elements at the given coordinate.
Method LocateElementsByEnvelope Returns the elements inside the given envelope.
Method MoveElementFromGroup Move the element from the group to the container.
Method MoveElementToGroup Move the element from the container to the group.
Method Next Returns the next graphic in the container.
Method PutElementOrder Private order object. Used to undo ordering operations.
Method Reset Reset internal cursor so that Next returns the first element.
Method SendBackward Move the specified elements one step closer to the bottom of the stack of elements.
Method SendToBack Make the specified elements draw behind all other elements.
Method UpdateElement The graphic element's properties have changed.

CoClasses that implement IGraphicsContainer

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.
Map A container for the display and manipulation of map data.
PageLayout Page Layout class contains maps and map surrounds.

See Also

IGraphicsContainerSelect Interface

.NET Snippets

Delete Graphics Refresh ActiveView | Add North Arrow | Create Graphic Buffers around Selected Features | Add Graphic to Map | Add Scale Bar | Add Legend | Add Graphics Layer to Globe

.NET Samples

Visualizing the camera path while animating (Code Files: VisualizeCameraPath) | Custom UI elements using add-ins (Code Files: AddGraphicsTool) | Extent view (Code Files: clsExtentView) | Geoevents in a MapControl (Code Files: GeoEvents) | Committing ink sketches using the controls ink commands (Code Files: InkSketchCommit) | Move a graphic along a path in ArcMap (Code Files: AnimationTypeMapGraphic MapGraphicKeyframe) | Copy the PageLayoutControl focus map and overwrite the MapControl map (Code Files: CopyFocusMap) | Print multiple pages (Code Files: PrintMultiPagesVB_NET_Addin) | Subset network evaluators (Code Files: AutoUpdateNetworkElementArrayParametersCommand SubsetHelperUI) | StreetMap routing (Code Files: RoutingForm) | Triangle graphic element (Code Files: TriangleElementTool) | Create a custom tool (Code Files: DrawGraphicLine) | Update a legend format with SymbologyControl area and line patches (Code Files: AreaLinePatches)

.NET Related Topics

Adjusting feature locations with spatial adjustment | Create a custom tool | How to create map grids | How to set output image quality | Working with map elements | Working with map surrounds | Working with PageLayout elements