<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to correctly load an icon for a button in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1542759#M12123</link>
    <description>&lt;P&gt;A couple of things I discovered in working through this issue:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The (simplified) syntax for the pack URI here appears to be&lt;BR /&gt;"pack://application:,,,/&lt;STRONG&gt;&amp;lt;project name&amp;gt;&lt;/STRONG&gt;;component/Images/&lt;STRONG&gt;&amp;lt;image file name&amp;gt;&lt;/STRONG&gt;.png"&lt;BR /&gt;I'm obviously no URI expert, as it took me some time to find that &lt;STRONG&gt;&amp;lt;project name&amp;gt;&lt;/STRONG&gt; needed to be the name used for the project.&amp;nbsp; So if I named my project &lt;STRONG&gt;CustomButton&lt;/STRONG&gt; and the image I want to use is &lt;STRONG&gt;cusbut32.png&lt;/STRONG&gt;, my pack URI is&lt;BR /&gt;"pack://application:,,,/CustomButton;component/Images/cusbut32.png"&lt;BR /&gt;&amp;nbsp; I was confused by the use of "&lt;STRONG&gt;Module1&lt;/STRONG&gt;" for &lt;STRONG&gt;&amp;lt;project name&amp;gt; &lt;/STRONG&gt;in some of the documentation.&lt;/LI&gt;&lt;LI&gt;The above doesn't work if you have a space in the project name, e.g. if I had named my project&lt;BR /&gt;&lt;STRONG&gt;Custom Button&lt;/STRONG&gt;, I'd have a space in the pack URI string, and that leads to unexpected results.&amp;nbsp; There's probably a way around this, but for now I'm making my project names all_one_word.&lt;/LI&gt;&lt;LI&gt;Visual Studio (version 17.11.4) doesn't appear to recognize that changes to &lt;STRONG&gt;config.daml&lt;/STRONG&gt; require a rebuild.&amp;nbsp; Again, there's probably some dependency that should be enabled, but I haven't figured it out; it may be in ESRI's &lt;STRONG&gt;ArcGIS Pro Module Addin&lt;/STRONG&gt; template.&amp;nbsp; For now I just use &lt;STRONG&gt;Build&amp;gt;Rebuild&lt;/STRONG&gt; instead of &lt;STRONG&gt;Build&amp;gt;Build&lt;/STRONG&gt; (or Ctrl-Shift-B).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks to everyone else who has contributed here!&lt;/P&gt;</description>
    <pubDate>Wed, 25 Sep 2024 23:14:23 GMT</pubDate>
    <dc:creator>CarlMagagnosc1</dc:creator>
    <dc:date>2024-09-25T23:14:23Z</dc:date>
    <item>
      <title>How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787716#M1316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm following the community samples and am trying to change the icon for my add in button. Its not working however, even though I have two buttons (one 16x16, other 32x32 like in the samples). They are present in both Images and Dark Images folders too, incase that mattered. They just dont load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The line in the DAML file&lt;/P&gt;&lt;P&gt;&amp;lt;button........ smallImage="Images\tree16.png" largeImage="Images\tree32.png"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I also use the same images for a window icon elsewhere, and it works perfectly. I've even tried the EvilGenius16/32.png from the samples and still no luck.&amp;nbsp;Meanwhile the GenericButton16/32 png's do work. I cannot find any reference to the Generic buttons anywhere in the entire project though, so I don't know if I'm missing a resource loading step or something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 15:47:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787716#M1316</guid>
      <dc:creator>DrewD</dc:creator>
      <dc:date>2017-09-15T15:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787717#M1317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Drew,&lt;/P&gt;&lt;P&gt;&amp;nbsp;If you want to add an image for your add-in buttons you have to change the 'Build Action' for each image to 'AddInContent'.&amp;nbsp; You can do that through the image property pane in your solution as shown here:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Diagnosing-ArcGIS-Pro-Add-ins#image-does-not-load-on-a-button-control"&gt;ProGuide-Diagnosing-ArcGIS-Pro-Add-ins&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 16:24:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787717#M1317</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2017-09-15T16:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787718#M1318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Wolf. I had previously thought build action was done in code but couldn't find it, that makes far more sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 16:34:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787718#M1318</guid>
      <dc:creator>DrewD</dc:creator>
      <dc:date>2017-09-15T16:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787719#M1319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have exactly the same problem. I set the "Build Action" for each image to "AddInContent", but the images still don't display. What am I doing wrong? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2020 14:49:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787719#M1319</guid>
      <dc:creator>BarbaraSchneider2</dc:creator>
      <dc:date>2020-01-17T14:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787720#M1320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Barbara, this might help:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It covers the various options for referencing images in your add-in. Pay close attention to the "image" Uri syntax - in particular the "/" - is it forwards or backwards "\"...? Notice for AddinContent it is backwards "\"....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One option that is not in that guide, but, seeing your post, I will add it, is to use something called a pack Uri. (cm - actually, on review, there is a section there called &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#referencing-images-from-arcgis-pro" rel="nofollow noopener noreferrer" target="_blank"&gt;Referencing images from Arcgis Pro&lt;/A&gt;&amp;nbsp;but I will expand it). A pack Uri is a way of referencing content that is contained, as a resource, ~within~ an assembly. A pack Uri looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;Button&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;...&lt;/SPAN&gt;
 &lt;SPAN class="attr-name token"&gt;largeImage&lt;/SPAN&gt;&lt;SPAN class="attr-value token"&gt;&lt;SPAN class="punctuation token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(and is a bit unfriendly). If you choose to use a pack Uri from your ~own~ add-in (notice how this one references "ArcGIS.Desktop.Resources" which is the Pro assembly that contains all of the Pro icons) you would do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Add the image to your add-in project. Assume you add it to the folder called "Images".&lt;/LI&gt;&lt;LI&gt;In Visual Studio, on the image properties, set its "Build Action" to &lt;STRONG&gt;Resource&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Change the pack Uri as follows - let's make an assumption that your add-in assembly is called "MyAddin.dll" and the image you added was called "MyImage32.png" and was added into the add-in Images folder:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;Button&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;...&lt;/SPAN&gt; 
   &lt;SPAN class="attr-name token"&gt;largeImage&lt;/SPAN&gt;&lt;SPAN class="attr-value token"&gt;&lt;SPAN class="punctuation token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;pack://application:,,,/MyAddin;component/Images/MyImage32.png&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One final point: After following these instructions your image &lt;STRONG&gt;may still not show&lt;/STRONG&gt; (eg on the button). Why? Well, let's assume that the issue is not syntax, the issue is not incorrect Build Action or path or other user error. Everything is exactly correct but the image still does &lt;STRONG&gt;not show&lt;/STRONG&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer is because of delay loading. Add-ins, by default, are delay loaded. This means that they do not actually ~load~ until a user activates them - usually by clicking on a button that is contained within the add-in. At &lt;EM&gt;&lt;STRONG&gt;that&lt;/STRONG&gt; &lt;/EM&gt;point in time, and &lt;EM&gt;&lt;STRONG&gt;only&lt;/STRONG&gt; &lt;/EM&gt;at that point in time, does the add-in assembly load. Delay loading is done as an optimization technique to only load those assemblies as they are needed....on demand, so to speak....and not all at once at startup. What this means for you is that the image you added as a Resource into your add-in assembly will &lt;STRONG&gt;not&lt;/STRONG&gt;&amp;nbsp;have been loaded (until the add-in is loaded) when the Pro ribbon is shown - In other words, you can "see" your button (&lt;EM&gt;sans&lt;/EM&gt; image) but the add-in behind it is, in fact, not loaded and so neither are any of its resources - to include the button image!!!. Alright, well great....but I still need to know how&amp;nbsp;do I get my image loaded and shown on the button on the ribbon!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have three options:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Force your add-in to load at Pro initialization. In that case your add-in assembly will be loaded and the image will be immediately available. To do this set the module "autoLoad" property in your Config.daml to "true" (it is false by default).&lt;/LI&gt;&lt;LI&gt;Reference an image in a dll that &lt;EM&gt;&lt;STRONG&gt;is&lt;/STRONG&gt; &lt;/EM&gt;loaded at start-up (such as the images found in ArcGIS.Desktop.Resources.dll) - Notice that this is what the Pro SDK Item templates do - by default all images are referenced from the Pro resources dll.&lt;/LI&gt;&lt;LI&gt;Use &lt;EM&gt;AddinContent&lt;/EM&gt; as the Image "Build Action". AddinContent is a custom&amp;nbsp;build action specifically designed to deal with the delay loading characteristics of add-ins and is installed with the Pro SDK. In a nutshell, if you use "&lt;SPAN&gt;AddinContent&amp;nbsp;"&lt;/SPAN&gt;, the image&amp;nbsp;will be referenced from &lt;EM&gt;within the add-in zip archive&lt;/EM&gt; and not from within the assembly. In other words, Pro does &lt;STRONG&gt;not&lt;/STRONG&gt; have to load the assembly to access the images built as "AddinContent". Note that the path separators for the image path point backwards "\". The downside with AddinContent is that Images with that build action type, because they live in the zip archive and not in the dll as resources, can only by referenced in the Config.daml and not in a WPF User Control, for example (via a pack Uri). It is a custom content type (we, "Esri" implemented to support delay loading) and is not a WPF resource type.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, consult &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources&lt;/A&gt;for more information and I will update that document to &lt;SPAN style="text-decoration: line-through;"&gt;cover&lt;/SPAN&gt;&amp;nbsp;provide more details on use of pack Uris in the Config.daml.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:59:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787720#M1320</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2021-12-12T08:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787721#M1321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Charles,&lt;/P&gt;&lt;P&gt;thank you for your answer. It now works! The following confused me: when you create a new add-in, and create a new button, the images "GenericButtonBlue16" and GenericButtonBlue32" are created in the folder "Images" of the project. However, these images are not used by the Add-In, but the ones in "ArcGIS.Desktop.Resources". This is confusing.&lt;/P&gt;&lt;P&gt;I had to reference my images the following way to make things work (not "pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/Image32.png"):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class=""&gt;&amp;lt;!-- Note the backslash --&amp;gt;
&lt;/SPAN&gt;&amp;lt;&lt;SPAN class=""&gt;button&lt;/SPAN&gt; &lt;SPAN class=""&gt;id&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"module1_Button1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;className&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"Button1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;caption&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"Button1"&lt;/SPAN&gt; &lt;SPAN class=""&gt;largeImage&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"Images\Image32.png"&lt;/SPAN&gt;/&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787721#M1321</guid>
      <dc:creator>BarbaraSchneider2</dc:creator>
      <dc:date>2021-12-12T16:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787722#M1322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! This drove me batty for an hour! I was going to work on my tool and thought "I'll just change the button real quick..." Hour and a half later, found myself on this page, where I finally got everything working.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2020 02:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/787722#M1322</guid>
      <dc:creator>AlderMaps</dc:creator>
      <dc:date>2020-05-30T02:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1257388#M9411</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;I am working with VS2022 and AGP 3.0.3. I dont see AddInContent as an option in Build Actions. Am I missing something here?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2023 19:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1257388#M9411</guid>
      <dc:creator>Amadeus111</dc:creator>
      <dc:date>2023-02-12T19:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1309990#M10058</link>
      <description>&lt;P&gt;I'm chiming in with a potential solution for anyone else who had issues with getting the button show up after trying all of the previously mentioned solutions (I was trying them all to no avail). I set the BuildAction of my image in Visual Studio 2022 to Resource, and named the button's large image as follows:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;&amp;lt;Button ...
largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/MyButton32.png"&amp;gt;‍‍‍‍‍&lt;/LI-CODE&gt;&lt;P&gt;Note, rather than using "/MyAddin" as shown here:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;"pack://application:,,,/MyAddin;component/Images/MyImage32.png"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I used "/ArcGIS.Desktop.Resources". Not sure if this will work for anyone else, but I found none of the previously mentioned solutions working for me until I tried this. Hope this helps in some way.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 12:57:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1309990#M10058</guid>
      <dc:creator>MaxwellS</dc:creator>
      <dc:date>2023-07-20T12:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1310159#M10060</link>
      <description>&lt;P&gt;Sorry for the delay but as of ArcGIS Pro 3.0 the build action 'AddInContent' is obsolete.&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Content-and-Image-Resources#addincontent" target="_blank"&gt;ProGuide Content and Image Resources · Esri/arcgis-pro-sdk Wiki (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The replacement is build action 'Content'&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 17:54:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1310159#M10060</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-07-20T17:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1310166#M10061</link>
      <description>&lt;P&gt;I think this ProGuide explains the issue:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Content-and-Image-Resources" target="_blank"&gt;ProGuide Content and Image Resources · Esri/arcgis-pro-sdk Wiki (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is a difference when referencing images from DAML versus referencing images from XAML.&amp;nbsp; The previous posts were DAML references, your example is XAML.&lt;/P&gt;&lt;P&gt;So, when you tried to apply the DAML solution to your XAML it didn't work, because the references and build actions are different for DAML and XAML.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 18:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1310166#M10061</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-07-20T18:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly load an icon for a button</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1542759#M12123</link>
      <description>&lt;P&gt;A couple of things I discovered in working through this issue:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The (simplified) syntax for the pack URI here appears to be&lt;BR /&gt;"pack://application:,,,/&lt;STRONG&gt;&amp;lt;project name&amp;gt;&lt;/STRONG&gt;;component/Images/&lt;STRONG&gt;&amp;lt;image file name&amp;gt;&lt;/STRONG&gt;.png"&lt;BR /&gt;I'm obviously no URI expert, as it took me some time to find that &lt;STRONG&gt;&amp;lt;project name&amp;gt;&lt;/STRONG&gt; needed to be the name used for the project.&amp;nbsp; So if I named my project &lt;STRONG&gt;CustomButton&lt;/STRONG&gt; and the image I want to use is &lt;STRONG&gt;cusbut32.png&lt;/STRONG&gt;, my pack URI is&lt;BR /&gt;"pack://application:,,,/CustomButton;component/Images/cusbut32.png"&lt;BR /&gt;&amp;nbsp; I was confused by the use of "&lt;STRONG&gt;Module1&lt;/STRONG&gt;" for &lt;STRONG&gt;&amp;lt;project name&amp;gt; &lt;/STRONG&gt;in some of the documentation.&lt;/LI&gt;&lt;LI&gt;The above doesn't work if you have a space in the project name, e.g. if I had named my project&lt;BR /&gt;&lt;STRONG&gt;Custom Button&lt;/STRONG&gt;, I'd have a space in the pack URI string, and that leads to unexpected results.&amp;nbsp; There's probably a way around this, but for now I'm making my project names all_one_word.&lt;/LI&gt;&lt;LI&gt;Visual Studio (version 17.11.4) doesn't appear to recognize that changes to &lt;STRONG&gt;config.daml&lt;/STRONG&gt; require a rebuild.&amp;nbsp; Again, there's probably some dependency that should be enabled, but I haven't figured it out; it may be in ESRI's &lt;STRONG&gt;ArcGIS Pro Module Addin&lt;/STRONG&gt; template.&amp;nbsp; For now I just use &lt;STRONG&gt;Build&amp;gt;Rebuild&lt;/STRONG&gt; instead of &lt;STRONG&gt;Build&amp;gt;Build&lt;/STRONG&gt; (or Ctrl-Shift-B).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks to everyone else who has contributed here!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 23:14:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-correctly-load-an-icon-for-a-button/m-p/1542759#M12123</guid>
      <dc:creator>CarlMagagnosc1</dc:creator>
      <dc:date>2024-09-25T23:14:23Z</dc:date>
    </item>
  </channel>
</rss>

