ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapView Class / HasPreviousCamera Method
Example

In This Topic
    HasPreviousCamera Method
    In This Topic
    Indicates whether the map view has a previous camera position.
    Syntax
    Public Function HasPreviousCamera() As Boolean
    public bool HasPreviousCamera()

    Return Value

    Returns true if the map view has a previous camera position.
    Remarks
    The map view will have a previous camera position if the camera has changed before, and if the camera stack has not been rewound to the beginning.
    Example
    Go To Previous Camera
    {
      //Zoom to the selected layers in the TOC
      if (mapView.HasPreviousCamera())
        mapView.PreviousCameraAsync();
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also