<?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 How to disable Add Data button in ArcGIS Pro application in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-disable-add-data-button-in-arcgis-pro/m-p/1116804#M7348</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are currently dealing with multiple Map Frames, but only one Map Frame should have the Add Data option enabled, while &lt;STRONG&gt;for the others it should be disabled&lt;/STRONG&gt; so that users cannot add data from &lt;STRONG&gt;external sources to the other Map Frames except one&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Below is the button I have to disable it for other Map Frames.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShabinaBano_0-1636976046755.png" style="width: 659px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27413i6D6D1BD1EBA0CF4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShabinaBano_0-1636976046755.png" alt="ShabinaBano_0-1636976046755.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is anyone aware of a way to accomplish this?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 05:18:05 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-01T05:18:05Z</dc:date>
    <item>
      <title>How to disable Add Data button in ArcGIS Pro application</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-disable-add-data-button-in-arcgis-pro/m-p/1116804#M7348</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are currently dealing with multiple Map Frames, but only one Map Frame should have the Add Data option enabled, while &lt;STRONG&gt;for the others it should be disabled&lt;/STRONG&gt; so that users cannot add data from &lt;STRONG&gt;external sources to the other Map Frames except one&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Below is the button I have to disable it for other Map Frames.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ShabinaBano_0-1636976046755.png" style="width: 659px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27413i6D6D1BD1EBA0CF4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ShabinaBano_0-1636976046755.png" alt="ShabinaBano_0-1636976046755.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is anyone aware of a way to accomplish this?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 05:18:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-disable-add-data-button-in-arcgis-pro/m-p/1116804#M7348</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-01T05:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable Add Data button in ArcGIS Pro application</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-disable-add-data-button-in-arcgis-pro/m-p/1125540#M7481</link>
      <description>&lt;P&gt;Add a custom condition for "canaddlayers_condition", with a "canaddlayers_state".&lt;/P&gt;&lt;P&gt;Add a button wired to the canaddlayers_condition.&amp;nbsp; Delete Esri's addData button, and insert your own adddata button. Wire your button to use the &lt;A href="https://github.com/Esri/arcgis-pro-sdk/blob/3e3b22ce8ffa619f4d0c4f9deefbd1cedd8c3de6/Examples/Content/ProSnippets.cs#L507" target="_self"&gt;Browse snippet&lt;/A&gt;&amp;nbsp;when it's clicked.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KirkKuykendall1_0-1639421639627.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/29569iCE63E5D698E7487F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KirkKuykendall1_0-1639421639627.png" alt="KirkKuykendall1_0-1639421639627.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Override the Initialize in your module to subscribe to active map view change event.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        protected override bool Initialize()
        {
            ActiveMapViewChangedEvent.Subscribe((ea) =&amp;gt;
            {
                string stateID = "canaddlayers_state";
                if (ea.IncomingView?.Map.Name == "Map1")
                    FrameworkApplication.State.Activate(stateID);
                else
                    FrameworkApplication.State.Deactivate(stateID);
                Trace.WriteLine("changed");
            });
            return base.Initialize();
        }&lt;/LI-CODE&gt;&lt;P&gt;When I activate/deactivate Map1, the button gets activated/deactivated.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KirkKuykendall1_1-1639421986086.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/29570i1E0DCA4BC7AAF4A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KirkKuykendall1_1-1639421986086.png" alt="KirkKuykendall1_1-1639421986086.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KirkKuykendall1_2-1639422009660.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/29571i1A03FDB4636DC470/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KirkKuykendall1_2-1639422009660.png" alt="KirkKuykendall1_2-1639422009660.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>Mon, 13 Dec 2021 19:02:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-disable-add-data-button-in-arcgis-pro/m-p/1125540#M7481</guid>
      <dc:creator>KirkKuykendall1</dc:creator>
      <dc:date>2021-12-13T19:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable Add Data button in ArcGIS Pro application</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-disable-add-data-button-in-arcgis-pro/m-p/1125784#M7492</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/201161"&gt;@KirkKuykendall1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;I Can't Thank You Enough.&amp;nbsp;&lt;/H3&gt;</description>
      <pubDate>Tue, 14 Dec 2021 11:45:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-disable-add-data-button-in-arcgis-pro/m-p/1125784#M7492</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-14T11:45:06Z</dc:date>
    </item>
  </channel>
</rss>

