I understand that you can reuse existing Pro controls on a custom tab using their refID, and you can obtain that refID from this document: ArcGIS Pro DAML ID Reference · Esri/arcgis-pro-sdk Wiki · GitHub
But when you reference a button inside a tab or group you can't access some of its properties, like Caption. For instance, if I want to use the esri_mapping_clearSelectionButton and esri_editing_ShowAttributes on my own tab, how do I get the captions?
If I add those tools to a group on my own tab I can't get the captions to appear:
You can't add the caption when you reference the tools here:
<group id="MyFavoriteGroupOfTools" caption="My Favorite Tools" appearsOnAddInTab="false">
<button refID="esri_editing_ShowAttributes" size="small"/>
<button refID="esri_mapping_clearSelectionButton" size="small"/>
Other questions about reusing tools:
Why does the Show Attributes tool look fine when both small and large, but the Clear Selection button doesn't seem to have a large icon?
Can you use an existing control but provide your own icon for it?
1. Buttons added to the Ribbon with the "small" attribute do not show the caption. You can use the "middle" or the "large" attribute to reference the button in order to show the Caption. The ProConcept: Framework topic in the wiki has this information. Refer to the Controls section for this information.
2. You are correct, the Clear Selection button doesn't have a large icon.
3. Here is a code snippet to modify an existing control to use your own icon:
var commandId = DAML.Button.esri_geoprocessing_selectByAttributeButton;
// get the ICommand interface from the ArcGIS Pro Button
// using command's plug-in wrapper
var iCommand = FrameworkApplication.GetPlugInWrapper(commandId) ;
We do not recommend modifying Pro Button icons in order to preserve a consistent user experience.
Uma Harano How would one achieve the vertically stacked small icons with captions using the show attributes and clear selection stock controls as shown in the first image I included in my post? This is from the Selection group on the Map tab.
This will accomplish what you are looking for:
<group id="ProAppModule3_Group1" caption="My favorite tools" appearsOnAddInTab="true">
<!-- host controls within groups -->
<button refID="esri_editing_ShowAttributes" size="middle"/>
<button refID="esri_mapping_clearSelectionButton" size="middle" />