This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Toggle to Dynamic Display Snippet (ArcObjects .NET 10.4 SDK) |
Switch from Map Display to Dynamic Display.
///<summary>Switch from Map Display to Dynamic Display.</summary> /// ///<param name="map">An IMap interface.</param> /// ///<remarks></remarks> public void ToggleToDynamicDisplay(ESRI.ArcGIS.Carto.IMap map) { //make sure to switch into dynamic mode ESRI.ArcGIS.Carto.IDynamicMap dynamicMap=map as ESRI.ArcGIS.Carto.IDynamicMap; //make sure that the current Map supports the DynamicDisplay if (null == dynamicMap) return; //switch into dynamic mode if (!dynamicMap.DynamicMapEnabled) dynamicMap.DynamicMapEnabled=true; }
'''<summary>Switch from Map Display to Dynamic Display.</summary> ''' '''<param name="map">An IMap interface.</param> ''' '''<remarks></remarks> Public Sub ToggleToDynamicDisplay(ByVal map As ESRI.ArcGIS.Carto.IMap) 'make sure to switch into dynamic mode Dim dynamicMap As ESRI.ArcGIS.Carto.IDynamicMap=TryCast(map, ESRI.ArcGIS.Carto.IDynamicMap) ' Dynamic Cast 'make sure that the current Map supports the DynamicDisplay If Nothing Is dynamicMap Then Return End If 'switch into dynamic mode If (Not dynamicMap.DynamicMapEnabled) Then dynamicMap.DynamicMapEnabled=True End If End Sub