This is for ArcGIS Pro add-in development using Csharp .NET.
What is the public, supported way to access the selected or right-clicked table or feature class in the Catalog pane from a context menu button?
Any guidance or code samples would be appreciated. Thank you!
Solved! Go to Solution.
Hi,
You can access them from Catalog pane :
protected override void OnClick()
{
var catalog = Project.GetCatalogPane();
var items = catalog.SelectedItems;
var item = items.OfType<ProGPXItem>().FirstOrDefault();
if (item == null)
return;
MessageBox.Show($"Selected Custom Item: {item.Name}");
}
Change items.OfType object type <T> to your needs or use without <T>
Hi,
You can access them from Catalog pane :
protected override void OnClick()
{
var catalog = Project.GetCatalogPane();
var items = catalog.SelectedItems;
var item = items.OfType<ProGPXItem>().FirstOrDefault();
if (item == null)
return;
MessageBox.Show($"Selected Custom Item: {item.Name}");
}
Change items.OfType object type <T> to your needs or use without <T>
thanks @GKmieliauskas , that worked nicely