This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Delete Graphics Refresh ActiveView Snippet (ArcObjects .NET 10.4 SDK) |
Delete all the graphics in the GraphicsContainer and refresh the ActiveView.
///<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(); }
'''<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