I am creating

1003
9
02-06-2020 01:43 PM
JeffBoyton
New Contributor II

I am creating Arcpro Add-Ins and would like to change the image used in Add-In Manager for my add-ins.  I tried changing the Image tag in the AddInInfo portion of the config.daml but all I can seem to do is make the image blank and the only image that seems to work is the default AddInDesktop32.png.  Is this broken functionality or is there something special needed here?

0 Kudos
9 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Hi Jeff,

 By default a newly added 'Addin Button' pulls its button images from image resources built into ArcGIS Pro using the 'pack' protocol as in:

<button ...
smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png"
largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png">‍‍‍‍‍‍‍‍‍‍‍‍
</button>‍‍‍‍‍‍‍‍

There are place holder images in the 'Images' and 'DarkImages' folder of your add-in project, however, before you can use those (or any modifications) you have to change the smallImage/largeImage attributes:

<button ...
smallImage="Images/GenericButtonBlue16.png"
largeImage="Images/GenericButtonBlue32.png">
</button>‍‍‍‍‍‍‍‍

The image in the 'DarkImages' folder is used when ArcGIS Pro is using Dark Theme.

There is a ProGuide to explain this:  Images as AddinContent

JeffBoyton
New Contributor II

Thank you for that information, but my question was concerning another area of the add-in.  The information below is displayed in ArcPro's Add-In Manager section:

<AddInInfo id="{<guid>}" version="10.0.0" desktopVersion="2.4.19948">
<Name>Name</Name>
<Description>Description</Description>
<Image>Images\AddinDesktop32.png</Image>
<Author>Author</Author>
<Company>Company</Company>
<Date>4/1/2020 9:07:24 AM, 2020</Date>
<Subject>Framework</Subject>
</AddInInfo>

If I try to change 'Images\AddinDesktop32.png' to any other image, I just get a blank image next to my add-in.

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Did you set the BuildAction (properties) for your new image to 'AddinContent' as shown here:  Images as AddinContent

0 Kudos
JeffBoyton
New Contributor II

Yes, I even tried using ESRI provided images (like GenericButtonBlue32.png in my project as addincontent and displayed as one of my add-in buttons) with the same blank result.

BTW, the link you are referring to gets a page not found error.

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

My bad ... i edited my replies and fixed the link.  I just changed my image (using Visual Studio's editor) and i was able to display the change:

I also changed my button image:

0 Kudos
JeffBoyton
New Contributor II

Were you able to specify an entirely different file for the Add-In Manager image?  Do I need to just replace the contents of the file with my image for this to work?

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

I used a different image file:  Test.png which has 32x32 pixels.  I edited the file with mspaint and saved as .png

I then added the file in the project's Image folder and changed the BuildAction property for the newly added image file to AddinContent.  Then i changed the Image tag as shown below (i honored the case of both path and file name):

  <AddInInfo id="{e8a5c762-09c9-4768-8a4e-a5046ef5b8e5}" version="1.0" desktopVersion="2.5.22081">
    <Name>ProAppModule11</Name>
    <Description>ProAppModule11 description</Description>
    <Image>Images\Test.png</Image>

and it worked fine:

0 Kudos
JeffBoyton
New Contributor II

I got it to work as you described.  I thought I was doing the same thing before but I must have missed a step.  Maybe you just gave me permission for it to work 😉  It is also possible that I needed a full rebuild (which I did this time).  Thanks for all of your guidance.

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Great!  I have gone down the same road a few times myself 😉

0 Kudos