<?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: Loadonclick button - ribbon bar in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747727#M285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great &lt;A href="https://community.esri.com/migrated-users/10927"&gt;Wolfgang Kaiser&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That help me centralize the state management in module class.&lt;/P&gt;&lt;P&gt;And one interesting part is that that trigger the button class instantiation as well. Not require to click tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Aug 2020 08:32:25 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-08-14T08:32:25Z</dc:date>
    <item>
      <title>Loadonclick button - ribbon bar</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747723#M281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to load/initialize the ribbon bar button after the module is intialized.&lt;/P&gt;&lt;P&gt;So I set loadOnClick="false" property on button control in daml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I add a few code at constructor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the constructor only call when the&amp;nbsp;tab&amp;nbsp;is activated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how shall I force the button to load upon project is loaded.&lt;/P&gt;&lt;P&gt;If the tab which hold the button need to be activated, how shall I achieve it? &lt;A href="https://community.esri.com/migrated-users/86730"&gt;Uma Harano&lt;/A&gt;‌ &lt;A href="https://community.esri.com/migrated-users/10927"&gt;Wolfgang Kaiser&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using pro 2.5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2020 02:07:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747723#M281</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-12T02:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loadonclick button - ribbon bar</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747724#M282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Than,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;You can look here for an explanation:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#jit-loading"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#jit-loading&lt;/A&gt;&amp;nbsp; In essence Pro is using JIT (Just in time) loading to make Pro be more responsive at startup.&amp;nbsp; However, if you need your add-in to start with Pro then you can&amp;nbsp;change the autoLoad attribute of the module tag&amp;nbsp;to "true" in your config.daml:&lt;/P&gt;&lt;PRE class="line-numbers language-markup"&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;insertModule&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;id&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;yourmoduleId&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;className&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;...&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;autoLoad&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;true&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;caption&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;...&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2020 17:46:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747724#M282</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-08-12T17:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Loadonclick button - ribbon bar</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747725#M283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank for your reply &lt;A href="https://community.esri.com/migrated-users/10927"&gt;Wolfgang Kaiser&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems, I shall need to explain full scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The one I want to achieve is that when user load/open the project, If the active view is map view, based on the certain condition the ribbon bar button will have different image and captions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Related to the tab group changing colour post you answer before, I have to determine condition and switch the tab group as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no idea how to retrieve the specific ribbon button instance from&amp;nbsp; Module instance, I manage the changing of button image and caption in the button class instance itself. So the condition/state for managing switching tab group and switching the image and caption of the ribbon button are the same.&lt;/P&gt;&lt;P&gt;And upon ribbon button click, the message result of those conditional check shall display.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried and initialised the button instance once the module is initialized. (That I want to achieve)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But right now, I add the boolean switch in module class to monitor button instance is initiated. Before button initiated, all the task to do checking condition/state is performed in module instance (of course button image/caption will not manage). So I did turn on autoload to true for the module as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2020 01:57:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747725#M283</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-13T01:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Loadonclick button - ribbon bar</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747726#M284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get the IPluginWrapper interface by using the button's ID from the config.daml.&amp;nbsp; Below is the snippet that i added to my test add-in's Module class:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;protected&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;override&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;bool&lt;/SPAN&gt; Initialize &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  ActiveMapViewChangedEvent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Subscribe&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;OnActiveMapViewChanged&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

  &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;base&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Initialize&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;/// Event delegate for the ActiveMapViewChangedEvent&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnActiveMapViewChanged&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ActiveMapViewChangedEventArgs args&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="comment token"&gt;// get the button and change the caption&lt;/SPAN&gt;
  &lt;SPAN class="comment token"&gt;// button's id from config.daml: DynamicButtonChange_ButtonMapLoaded&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; plugin &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; FrameworkApplication&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetPlugInWrapper&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DynamicButtonChange_ButtonMapLoaded"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;args&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IncomingView &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    plugin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Caption &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"No Mapview"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// plugin.LargeImage = ...&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
  plugin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Caption &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Active Mapview"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="comment token"&gt;// plugin.LargeImage = ...&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:47:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747726#M284</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-12-12T07:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Loadonclick button - ribbon bar</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747727#M285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great &lt;A href="https://community.esri.com/migrated-users/10927"&gt;Wolfgang Kaiser&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That help me centralize the state management in module class.&lt;/P&gt;&lt;P&gt;And one interesting part is that that trigger the button class instantiation as well. Not require to click tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2020 08:32:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/loadonclick-button-ribbon-bar/m-p/747727#M285</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-14T08:32:25Z</dc:date>
    </item>
  </channel>
</rss>

