ESRI.ArcGIS.ADF.IMS
Remove Method
See Also  Example
ESRI.ArcGIS.ADF.IMS.Display.AcetateElement Namespace > AcetateElementCollection Class : Remove Method




a
The AcetateElement to be removed from the collection.
Removes an AcetateElement from a collection.

Syntax

Visual Basic (Declaration) 
Public Sub Remove( _
   ByVal a As AcetateElement _
) 
Visual Basic (Usage)Copy Code
Dim instance As AcetateElementCollection
Dim a As AcetateElement
 
instance.Remove(a)
C# 
public void Remove( 
   AcetateElement a
)

Parameters

a
The AcetateElement to be removed from the collection.

Example

This example adds, then removes an element from an acetate layer. It assumes the acetate element and acetate layer have been previously constructed.
Visual BasicCopy Code
' Add a previously created element to an existing acetate layer

acetateLayer.AcetateElements.Add(acetatePt)



' Add acetate layer to the map

mapView.Layers.Add(acetateLayer)



' Remove the acetate graphic from the layer

acetateLayer.AcetateElements.Remove(acetatePt)

C#Copy Code
// Add a previously created element to an existing acetate layer 

acetateLayer.AcetateElements.Add(acetatePt) 

  

// Add acetate layer to the map 

mapView.Layers.Add(acetateLayer) 

  

// Remove the acetate graphic from the layer 

acetateLayer.AcetateElements.Remove(acetatePt) 

    

Remarks

Using Remove requires that you have a reference to an existing acetate element.

If you remove all elements from an acetate layer's AcetateElementCollection, the acetate layer should be removed from the map as well. Otherwise, a runtime error will be thrown for an empty collection.

See Also

© 2010 All Rights Reserved.