ArcGIS Pro Button new png image doesn't work

3431
12
12-09-2016 11:24 AM
andresarias
New Contributor II

I'm creating with photoshop png files for the button on an add-in for ArcGIS Pro, but for some reason they are not being displayed (the ones that come with the samples do work). Does anybody know why? #arcgispro #add-ins #buttons

0 Kudos
12 Replies
UmaHarano
Esri Regular Contributor

Hi Andres

The two things to watch for while adding a custom image to a button is:

  • The direction of the folder slash you specify for the png in the daml.
  • The png file's BuildAction property specified in Visual Studio should be "AddInContent" and not Resource.

There is a ProGuide Diagnosing ArcGIS Pro Add ins that discusses this. Check out the 

Thanks

Uma Harano

ArcGIS Desktop SDK team

andresarias
New Contributor II

Thank you Uma, but it is not working either.

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Andres

To see where the problem lies, you could try this:

1. In Visual Studio, create a simple add-in with just a button item using the SDK Templates.

2. In your file explorer, access the Images folder of this add-in on disk.

3. You will see the GenericButtonBlue32.png and GenericButtonBlue16.png.

4. Delete them.

5. Copy your custom png to this folder and rename your png to be GenericButtonBlue32.png and GenericButtonBlue16.png

6. In Visual Studio, compile your add-in project and test if the button loads in Pro with the custom png instead of the generic blue image.

If it does, then you could check your add-in where it is not working. If it does not work, it could be a png issue.

Thanks

Uma

andresarias
New Contributor II

Thank you Uma

I does work using the default png file name, but not when I use a different file name.

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Andres

Can you please zip up your project and add it to this thread? I can take a look at it and see why this is not working for you.

Thanks

Uma

andresarias
New Contributor II

Sorry Uma, I can't find how to attach the zip file.

I can only find how to insert links, images and video.

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Andres,

When you are typing up a message in GeoNet, click on the "Use Advanced Editor"  on the top right corner above your message.

You will see the "Attach" option at the bottom. Like this screenshot below.

Thanks

Uma

andresarias
New Contributor II

Is it the horizontal 3-point button right after the "insert video" one in your screenshot?

if so, it doesn't show on my message (neither on firefox nor iexplorer).

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Andres

The "Use Advanced editor" button is highlighted in the screenshot below. When you click that, you will see an option to Attach files to your message.

Thanks

Uma