protected override void OnClick()
{
ExecuteProCommand("esri_core_showProjectView");
ExecuteProCommand("esri_core_showProjectDockPane");
}
/// <summary>
/// Generic implementation of ExecuteCommand to allow calls to
/// execute any Pro command / tool by using its Id
/// </summary>
/// <param name="proPluginId">Pro ID (command/tool) to run</param>
/// <returns></returns>
private static void ExecuteProCommand(string proPluginId)
{
var command = FrameworkApplication.GetPlugInWrapper(proPluginId) as ICommand;
if (command == null || !command.CanExecute(null)) return;
command.Execute(null);
}
//Get the catalog pane
ArcGIS.Desktop.Core.IProjectWindow projectWindow = Project.GetCatalogPane();
//Get the selected items from the catalog pane:
var items = projectWindow.SelectedItems();
//or get the active catalog view...
//ArcGIS.Desktop.Core.IProjectWindow projectWindow = Project.GetActiveCatalogWindow();