AnsweredAssumed Answered

Can only click GalleryItem once - Pro SDK

Question asked by twhiteaker on May 2, 2019
Latest reply on Jun 5, 2019 by stefan.dieters@dpipwe

In ArcGIS Pro, I can only click a particular item from my custom gallery once.  If I click the gallery drop down and click the same item again, nothing happens.  Here's the OnClick:


protected override void OnClick(GalleryItem item)

I put a breakpoint in the code on the message box line, and it hits it the first time I click an item but not the second.  However, if I click a different gallery item, then the breakpoint is hit (but not if I click that second gallery item again).


When I compile the gallery sample, I get the same behavior.  To reproduce the bug:


1. Download and build the gallery sample (under Framework/Gallery).

2. Start Pro and click a web map from the gallery. It is added to your project.

3. Delete the map and click the same web map in the gallery again. No map is added this time.


What's the trick to handling when a user clicks on a gallery item they've clicked before?



Windows 10

Visual Studio 2017 Community Edition

Pro SDK for .NET (and Utilities)

Pro 2.3.2