![]() ![]() |
ESRI.ArcGIS.ADF.IMS | |
Remove Method | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.IMS.Display.AcetateElement Namespace > AcetateElementCollection Class : Remove Method |
- a
- The AcetateElement to be removed from the collection.
Visual Basic (Declaration) | |
---|---|
Public Sub Remove( _ ByVal a As AcetateElement _ ) |
Visual Basic (Usage) | ![]() |
---|---|
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.
This example adds, then removes an element from an acetate layer. It assumes the acetate element and acetate layer have been previously constructed.
Visual Basic | ![]() |
---|---|
' 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# | ![]() |
---|---|
// 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) |
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.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family