Using C#, I need to activate (or bring focus to) MapView.Active that has become inactive or been superseded. I need to ensure it's active before running operations on it in a customized interface. Thanks.
Solved! Go to Solution.
Hi Mike,
There is an example dealing with MapViews here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/OpenMapViews
The code snippet below finds any map view pane with a given caption and brings the first matching one to the foreground (by calling .Activate()).
var mapPanes = ProApp.Panes.OfType<IMapPane>();
foreach (Pane pane in mapPanes)
{
if (pane.Caption == "Your map view's caption")
{
pane.Activate();
break;
}
}
Hi Mike,
There is an example dealing with MapViews here: https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/OpenMapViews
The code snippet below finds any map view pane with a given caption and brings the first matching one to the foreground (by calling .Activate()).
var mapPanes = ProApp.Panes.OfType<IMapPane>();
foreach (Pane pane in mapPanes)
{
if (pane.Caption == "Your map view's caption")
{
pane.Activate();
break;
}
}
Thank You.