<?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: Content vs Resource in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/content-vs-resource/m-p/1191535#M8386</link>
    <description>&lt;P&gt;Interesting. Almost everything I have read up to now says to use Content.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2022 13:55:30 GMT</pubDate>
    <dc:creator>AbelPerez</dc:creator>
    <dc:date>2022-07-12T13:55:30Z</dc:date>
    <item>
      <title>Content vs Resource</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/content-vs-resource/m-p/1191412#M8379</link>
      <description>&lt;P&gt;So working on our company Addin off and on. I've added some Button and DockPane controls and have used custom images with BuildAction=Content. It all works great.&lt;/P&gt;&lt;P&gt;I've extended the functionality with a Pane and ProWindow control but could &lt;STRONG&gt;not get&lt;/STRONG&gt; any images to display. It dawned on me that maybe I was doing something wrong. From the forum I found a post that said use BuildAction=Resource. So I did that and it worked!!!&lt;/P&gt;&lt;P&gt;So my question is...what is the difference? Why do we need two options? Why wouldn't the control auto detect that a BuildAction on the graphic is not compatible?&amp;nbsp;What if I need the same graphic in various controls that use Content and Resource? Do I have to add it twice?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AbelPerez_0-1657587741294.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/45700i883C58A08363279E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AbelPerez_0-1657587741294.png" alt="AbelPerez_0-1657587741294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 01:04:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/content-vs-resource/m-p/1191412#M8379</guid>
      <dc:creator>AbelPerez</dc:creator>
      <dc:date>2022-07-12T01:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Content vs Resource</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/content-vs-resource/m-p/1191430#M8381</link>
      <description>&lt;P&gt;There are many different build actions in Visual Studio and it can be a bit confusing on which one to use (for any given usage).&lt;/P&gt;&lt;P&gt;Content is a bit of an odd ball and I, personally, am not exactly sure what it is specifically intended for - I think it is more relevant for building ASP apps where "content" needs to be deployed to a website. I believe files marked as "content" get deployed with the website when it is published. The documentation (see below) also states that file content marked as "Content" will be accessible via&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/dotnet/api/system.windows.application.getcontentstream" target="_self"&gt;Application.GetContentStream&lt;/A&gt;&amp;nbsp; but I have not had occasion to use that.&lt;/P&gt;&lt;P&gt;Resource is a WPF build action and this is usually what you want for images. When image content is marked as Resource it is literally compiled into the DLL and gets&amp;nbsp;&lt;SPAN&gt;embedded in the assembly's manifest resources. This allows you to access said image resources with something called&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;a&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.microsoft.com/en-us/dotnet/desktop/wpf/app-development/pack-uris-in-wpf?view=netframeworkdesktop-4.8&amp;amp;viewFallbackFrom=netdesktop-6.0" target="_self"&gt;Pack URI&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The VS Build action reference is here if you are interested in reading further:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/visualstudio/ide/build-actions?view=vs-2022" target="_self"&gt;Build actions for files&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 02:45:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/content-vs-resource/m-p/1191430#M8381</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2022-07-12T02:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Content vs Resource</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/content-vs-resource/m-p/1191535#M8386</link>
      <description>&lt;P&gt;Interesting. Almost everything I have read up to now says to use Content.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 13:55:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/content-vs-resource/m-p/1191535#M8386</guid>
      <dc:creator>AbelPerez</dc:creator>
      <dc:date>2022-07-12T13:55:30Z</dc:date>
    </item>
  </channel>
</rss>

