Pro 3.4 ribbon shows image at different size for button loaded from separate add-in

257
9
01-14-2025 08:20 AM
JeffreyBurka
Occasional Contributor

I've got a pair of add-ins. The first (A) defines a tab, a group in that tab, and a set of buttons in the group. The second (B) defines a button and places it into the group defined in the first add-in. This all works fine in Pro 3.3.

I just upgraded a machine to 3.4 and found that the button inserted from add-in B looks like it's using the png defined in the smallImage attribute instead of the largeImage. See the attached image showing four buttons as expected and one at the wrong size.

Does the new 3.4 Ribbon have some other requirement or attribute I can set? Or is this a bug?

Tags (3)
9 Replies
ConnerPearce
Emerging Contributor

Same issue here so interested in a fix as well

0 Kudos
MK13
by
Frequent Contributor

@UmaHarano @Wolf @CharlesMacleod do you have any insight into this apparent bug?

 

0 Kudos
UmaHarano
Esri Regular Contributor

Would it be possible for you to share your small and large images? I used the Pro Icons (FireDragon16 and 32) and couldn't repro the issue.

0 Kudos
UmaHarano
Esri Regular Contributor

@JeffreyBurka 

Couple of thigs to check -

1. In the config.daml, what is the size you have used for the buttons in the "group" element - 

        <group id="AddInB_Group1" caption="Group 1" appearsOnAddInTab="false">
          <!-- host controls within groups -->
          <button refID="AddInB_ButtonAddInB" size="large" />
        </group>

 

2. When you elongate the Pro UI, are you able to see the large image for your button?

0 Kudos
UmaHarano
Esri Regular Contributor

Here is the update on this issue.

At 3.4, the ribbon buttons are not properly stretching the image when using a small icon (16x16) in a place requested for a large icon (32 x 32). The ImageSource does not stretch to fill the space.
As a workaround, two images can be provided in the addin - for smallimage and largeImage daml attributes.

ArcGIS Pro comes with many out of the box images. This community sample allows you to see the entire list:  https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ProIcons 

If you use the available ProIcons, you can simply copy the icon name (in the image below) and use it in the daml.  Almost all icons will have the 16 and 32 sizes. Note: this image below is available if you use the community sample referenced above.

UmaHarano_0-1738953388895.png

 

MK13
by
Frequent Contributor

@UmaHarano this solution did not work for me. My custom icons are still showing up as small(16 by 16) even though I set it to use the large image(32 by 32).

MK13_0-1739316795648.png

 

0 Kudos
UmaHarano
Esri Regular Contributor

Hi @MK13 

Can you please attach a small addin solution and post? (With the image). 

0 Kudos
MK13
by
Frequent Contributor

@UmaHarano I have attached a project that replicates the button issue. 

0 Kudos