

{
//Activate an already open layout view.
//A layout view may be open but it may not be active.
//Find the pane that references the layout and activate it.
//Note - there can be multiple panes referencing the same layout.
foreach (var pane in ProApp.Panes)
{
var layoutPane = pane as ILayoutPane;
if (layoutPane == null) //if not a layout view, continue to the next pane
continue;
if (layoutPane.LayoutView.Layout == layout) //activate the view
{
(layoutPane as Pane).Activate();
return;
}
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)