var elevProfileGraph = MapView.Active.GetElevationProfileGraph(); // Elevation profile graph will be null if no profile graph is displayed if (elevProfileGraph == null) return; // get the elevation profile geometry and stats var polyline = elevProfileGraph.Geometry; var stats = elevProfileGraph.ElevationProfileStatistics; // reverse the graph elevProfileGraph.IsReversed = !elevProfileGraph.IsReversed; // collapse the graph elevProfileGraph.IsExpanded = false;
Target Platforms: Windows 11, Windows 10