Delete all the graphics in the GraphicsContainer and refresh the ActiveView.
[C#]
///<summary> ///Delete all the graphics in the GraphicsContainer and refresh the ActiveView. ///</summary> ///<param name="activeView">An ESRI.ArcGIS.Carto.IActiveView interface that will have the graphics deleted and refreshed.</param> ///<remarks></remarks> public void DeleteGraphicsRefreshActiveView(ESRI.ArcGIS.Carto.IActiveView activeView) { ESRI.ArcGIS.Carto.IGraphicsContainer graphicsContainer = activeView.GraphicsContainer; graphicsContainer.DeleteAllElements(); activeView.Refresh(); }
[Visual Basic .NET]
'''<summary> '''Delete all the graphics in the GraphicsContainer and refresh the ActiveView. '''</summary> '''<param name="activeView">An ESRI.ArcGIS.Carto.IActiveView interface that will have the graphics deleted and refreshed.</param> '''<remarks></remarks> Public Sub DeleteGraphicsRefreshActiveView(ByVal activeView As ESRI.ArcGIS.Carto.IActiveView) Dim graphicsContainer As ESRI.ArcGIS.Carto.IGraphicsContainer = activeView.GraphicsContainer graphicsContainer.DeleteAllElements() activeView.Refresh() End Sub