public string GetActiveMapName() { //Get the active map view. var mapView = MapView.Active; if (mapView == null) return null; //Return the name of the map currently displayed in the active map view. return mapView.Map.Name; }
Target Platforms: Windows 11, Windows 10, Windows 8.1