<?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 Setting button initial state in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780578#M1128</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my add-in I'm using Delegate Commands to control button sensitivity, but it does not seem to affect the initial button state.&amp;nbsp; I am not specifying any condition in the DAML, but all buttons appear enabled at startup instead of just the one desired.&amp;nbsp; Here are the corresponding methods and properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal static void OnConnectButtonClick()&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_connected = true;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal static bool CanOnConnectButtonClick&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;get {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return !_connected;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal static void OnDisconnectButtonClick()&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_connected = false;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal static bool CanOnDisconnectButtonClick&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;get {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return _connected;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing here?&amp;nbsp; It seems the only way I'm able to achieve the desired effect is to create a configuration with custom conditions and set the condition/state in the OnApplicationReady() method.&amp;nbsp; Is there a way to accomplish this with just an add-in?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2018 19:05:19 GMT</pubDate>
    <dc:creator>MichaelPanlasigui</dc:creator>
    <dc:date>2018-10-11T19:05:19Z</dc:date>
    <item>
      <title>Setting button initial state</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780578#M1128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my add-in I'm using Delegate Commands to control button sensitivity, but it does not seem to affect the initial button state.&amp;nbsp; I am not specifying any condition in the DAML, but all buttons appear enabled at startup instead of just the one desired.&amp;nbsp; Here are the corresponding methods and properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal static void OnConnectButtonClick()&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_connected = true;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal static bool CanOnConnectButtonClick&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;get {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return !_connected;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal static void OnDisconnectButtonClick()&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_connected = false;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;internal static bool CanOnDisconnectButtonClick&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;get {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return _connected;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing here?&amp;nbsp; It seems the only way I'm able to achieve the desired effect is to create a configuration with custom conditions and set the condition/state in the OnApplicationReady() method.&amp;nbsp; Is there a way to accomplish this with just an add-in?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 19:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780578#M1128</guid>
      <dc:creator>MichaelPanlasigui</dc:creator>
      <dc:date>2018-10-11T19:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Setting button initial state</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780579#M1129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unless you use a &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#conditions-and-state"&gt;Condition&lt;/A&gt;, you must set Autoload=true in your Config.daml. Otherwise, your add-in is not loaded until your button is clicked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 20:10:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780579#M1129</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2018-10-11T20:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Setting button initial state</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780580#M1130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Charles, for the quick reply.&amp;nbsp; I failed to mention it in the initial post, but I am setting autoLoad="true" in Config.daml.&amp;nbsp; This does not seem affect the behavior.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 20:27:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780580#M1130</guid>
      <dc:creator>MichaelPanlasigui</dc:creator>
      <dc:date>2018-10-11T20:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Setting button initial state</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780581#M1131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Taking your instruction further, in addition to setting autoLoad="true" for the module, I also set loadOnClck="false" on each button.&amp;nbsp; That seems to do the trick.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 20:55:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/setting-button-initial-state/m-p/780581#M1131</guid>
      <dc:creator>MichaelPanlasigui</dc:creator>
      <dc:date>2018-10-11T20:55:21Z</dc:date>
    </item>
  </channel>
</rss>

