{
//Zoom map frame to the extent of a single layer.
//Note: Must be on QueuedTask.Run
//Reference map and layer
Map m = mapFrame.Map;
FeatureLayer lyr = m.FindLayers("GreatLakes").First() as FeatureLayer;
//Set the map frame extent to all features in the layer
mapFrame.SetCamera(lyr, false);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)