ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapView Class / Time Property
Example

In This Topic
    Time Property (MapView)
    In This Topic
    Gets or sets the time range visible in the map view.
    Syntax
    public TimeRange Time {get; set;}
    Public Property Time As TimeRange
    Remarks
    This property is null when there are no time aware layers in the map. When the Time property is not null, but both the Start and End properties of the TimeRange are null this means the map view is showing all time. This is equivalent to disabling time in the map view. Setting this property to null when there are time aware layers in the map will set both the start and end properties of the TimeRange to null.
    Example
    Step forward in time by 1 month
    public void StepMapTime()
    {
      //Get the active view
      MapView mapView = MapView.Active;
      if (mapView == null)
        return;
    
      //Step current map time forward by 1 month
      TimeDelta timeDelta = new TimeDelta(1, TimeUnit.Months);
      mapView.Time = mapView.Time.Offset(timeDelta);
    }
    
    Disable time in the map.
    MapView.Active.Time.Start = null;
    MapView.Active.Time.End = null;
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also