if (!MapView.Active.CanShowElevationProfileGraph())
return;
// find a specific elevation surface layer
var eleLayer = MapView.Active.Map.GetElevationSurfaceLayers().FirstOrDefault(l => l.Name == "TIN");
// set up the parameters
var profileParams = new ElevationProfileParameters();
profileParams.SurfaceLayer = eleLayer;
profileParams.Densify = true;
// show the elevation profile for a polyline using the params
MapView.Active.ShowElevationProfileGraph([lineGeom], profileParams);
// show the elevation profile for a set of points using the params
MapView.Active.ShowElevationProfileGraph(pts, profileParams);