I have a scenarion where i add some item of type "CustomItemBase" in catalog pane,and on some condition i need to change the image of that item,if i try to update "SmallImage" it doesnt works!
Hi,
Do you use CustomItemBase directly or implementation of Custom Items derived from the CustomItemBase class?
You can find more info about CustomItemBase here.
This currently isn't possible with the API. The expectation is that an Item (custom or otherwise) has a single fixed smallImage and largeImage.
Can you explain your workflow and why it makes sense to have different images displayed depending upon a condition.
regards
Narelle
Scenario is:I add the some item from FGDB to map, then I set the icon as "~Latest",if I modify some attributes of that item but dont save to FGDB then I set the icon called "~Modified",once i save the item again to FGDB then the icon again needs to be set icon as "~Latest"------------------------------------------------------------------I tried 1 approach that if i change ArcGIS.Desktop.Core.CustomItemBase.SmallImage & call ArcGIS.Desktop.Core.CustomItemBase.RenameAsync with always a different name then the image and name is changed, but if i just change ArcGIS.Desktop.Core.CustomItemBase.SmallImage it dont work (i see the old image), so i believe some caching on catalog pane by name is kept!
Within the Catalog pane, Item images are associated with the Item type; and as a result are cached internally as you have seen. Changing the item image per instance of a type isn't supported behaviour.
I would recommend just changing the item name (as you are doing with RenameAsync) and indicating the status with the name - perhaps adding your "Latest" or "Modified" text in parenthesis.
Regards
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.