I was trying to select a layer from ArcGIS Online using the following code. I can click the layer but pDialog.Items also return empty. Any ideas?
var pDialog = new ArcGIS.Desktop.Catalog.OpenItemDialog();
pDialog.MultiSelect = false;
pDialog.Filter = "tables_all";
var pItems = pDialog.Items;
if (pItems == null) return;
var pList = pItems.ToList<ArcGIS.Desktop.Core.Item>();
if (pList.Count < 1) return;
var pItem = pList;
if (pItem == null) return;
I am not able to reproduce this - When I select a layer from the OpenItemDialog (available from MyContent on ArcGIS Online) pDialog.Items is not empty.
Can you please provide some information on the content you are trying to access? It is a standalone table?
Maybe it is to do with ArcGIS Pro version. It is not working in 2.2. But I tested in an ArcGIS 2.3 machine and it is working fine.
Thank you for your help!