I'm creating a gallery for an add-in. I've followed various examples to create the gallery, and I can see how to use buttons to provide the additional functionality offered by stock modules - for example, the "Switch Gallery Size," "All tools," and "Customize" options in the Edit module.
What I can't understand is how to specifically bring up the gallery customization dialog shown below - This is what you get when you click "Customize" at the bottom of the Tools Gallery in the Edit module. Several parts of the SDK documentation refer to "the gallery customization dialog." For instance, the IGalleryItem's basic description is, "Implement this interface for a gallery item class if the gallery needs to be displayed in the gallery customization dialog."
How do we actually bring up this dialog via the SDK?
Unfortunately, the customize gallery dialog is not currently available as part of the public ArcGIS Pro API.
Thanks for getting back to me Narelle Chedzey. Is that also the case with the "All Tools" option on the Edit gallery, or would I be able to achieve similar functionality with a button that pulls up a dockpane?
The "All Tools" option in the Edit gallery is written specifically to open the Modify Features pane and show the System Tools tab. It is not written in a way that depends on, or has a connection to the items in the gallery.
If you have a gallery of your own objects (that are not Pro editing tools), then your version of "All Tools" could do a similar thing in displaying a dockpane with those items, but that dockpane and the way it displays the content is something you would have to write yourself.
Thanks Narelle Chedzey - one more related question. Are the "Add to Favorites" and "Remove from Favorites" options available / implementable? I'm referring to the options you see when you right-click an item within the Edit gallery.
If this is possible for custom galleries, would it be implemented by dynamically adding those right-clicked items to the "Favorites" group, held at the top of the gallery? (And can gallery items belong to more than one group)?
The Add To Favorites, Remove From favorites menuitems are buttons we have written to add or remove the highlighted Edit tool from the Editing Tools Favorites group. Rather than placing them on the ribbon we have written them as a context driven button and use them within a dynamic menu object showing or hiding the appropriate menu item according to the whether the gallery item clicked on is in the favorites group. The gallery template we use for displaying the items has a standard WPF Grid control which uses the ContextMenu property to bind to this dynamic menu object.
You could implement the exact same mechanism with your custom gallery.
If you're not familiar with dynamic menus, here is a sample that illustrates the concept of dynamic menus
arcgis-pro-sdk-community-samples/Framework/DynamicMenu at master · Esri/arcgis-pro-sdk-community-sam...
Re your second question - can gallery items belong to more than one group. No, they cannot. If you want your gallery item to belong to a second group, then you will need to create a new gallery item with the same properties apart from the Group Name and add it to your gallery collection.
I will make a note to update the Gallery sample to illustrate the concepts you've been asking about. That sample was originally written in 2017 so it's a few years old now.
Hope this helps. Feel free to ask more questions if you get stuck.