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


IGraphicsContainer.AddElement Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IG > IGraphicsContainer Interface > IGraphicsContainer.AddElement Method
ArcGIS Developer Help

IGraphicsContainer.AddElement Method

Add a new graphic element to the layer.

[Visual Basic .NET]
Public Sub AddElement ( _
    ByVal Element As IElement, _
    ByVal zorder As Integer _
)
[C#]
public void AddElement (
    IElement Element,
    int zorder
);
[C++]
HRESULT AddElement(
  IElement* Element,
  long zorder
);
[C++]
Parameters
Element [in]

Element is a parameter of type IElement* zorder [in]
zorder is a parameter of type long

Product Availability

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

Description

This method adds the input element the graphics container referenced.  The parameter zorder is currently not utilized by all of the IGraphicsContainer implementations and is typically set to 0 when calling this method.

See Also

IGraphicsContainer Interface

.NET Samples

Move a graphic along a path in ArcMap Create a custom tool Custom UI elements using add-ins Extent view Geoevents in a MapControl StreetMap routing Visualizing the camera path while animating