<?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: Delete button from ribbon based on state or condition in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1196347#M8496</link>
    <description>&lt;P&gt;Thanks, &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;. I'll look into those because I'm currently modifying the DAML file in pre-build scripts for Beta and RC versions. I just added the button removal to those scripts as a quick fix, but converting to a Configuration may be a cleaner method all-around.&lt;/P&gt;&lt;P&gt;I'm pretty sure this is the case from those links, but can a user have multiple configurations installed at the same time? We develop multiple different Add-ins, and users can have any number installed. The Add-ins don't need to block existing Pro functionality and also don't need to affect other third-party Add-ins.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 14:36:39 GMT</pubDate>
    <dc:creator>tempStephenRhea_NV5</dc:creator>
    <dc:date>2022-07-27T14:36:39Z</dc:date>
    <item>
      <title>Delete button from ribbon based on state or condition</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1195135#M8481</link>
      <description>&lt;P&gt;I want to delete a button from the ribbon based on a custom state. I'm already using conditions to enable/disable buttons until the user configures the add-in, but I'm trying to create a "viewer-only" ribbon that doesn't even include buttons for creation/editing. The &amp;lt;updateModule&amp;gt;...&amp;lt;deleteButton&amp;gt; workflow is great, but I only need it to run for a viewer-only build.&lt;/P&gt;&lt;P&gt;My original idea was to check for a compiler directive in the add-in constructor and set a custom "viewer" state, which would then activate the &amp;lt;updateModule&amp;gt; section. Is this possible?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 21:23:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1195135#M8481</guid>
      <dc:creator>tempStephenRhea_NV5</dc:creator>
      <dc:date>2022-07-22T21:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Delete button from ribbon based on state or condition</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1195369#M8487</link>
      <description>&lt;P&gt;FWIW, another option I'm considering is a separate "viewer-only" daml file that gets swapped out during the build process, but the maintenance risk of the two files getting out of sync is something I'm trying to avoid.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 12:18:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1195369#M8487</guid>
      <dc:creator>tempStephenRhea_NV5</dc:creator>
      <dc:date>2022-07-25T12:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Delete button from ribbon based on state or condition</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1195738#M8489</link>
      <description>&lt;P&gt;If you create a 'Manage Configuration' instead of an 'Add-in Module' you can customize the User Interface.&amp;nbsp; See details here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Configurations#using-configurations-to-customize-the-user-interface-and-functionality" target="_blank"&gt;ProGuide Configurations · Esri/arcgis-pro-sdk Wiki (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The ProGuide also references a sample that changes the user interface by removing most ribbons / buttons:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/esri/arcgis-pro-sdk-community-samples/tree/master/Framework/ConfigWithMap" target="_blank"&gt;arcgis-pro-sdk-community-samples/Framework/ConfigWithMap at master · Esri/arcgis-pro-sdk-community-samples (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and the sample's 'custom' UI looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1658812343047.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46744i70338D316681EB3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1658812343047.png" alt="Wolf_0-1658812343047.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;An earlier version of the sample checked user permission to determine if the UI was read-only or read/write by controlling the DAML of the 'Start Editing' button, but for simplicity of the sample this feature was removed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 05:16:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1195738#M8489</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2022-07-26T05:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Delete button from ribbon based on state or condition</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1196347#M8496</link>
      <description>&lt;P&gt;Thanks, &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;. I'll look into those because I'm currently modifying the DAML file in pre-build scripts for Beta and RC versions. I just added the button removal to those scripts as a quick fix, but converting to a Configuration may be a cleaner method all-around.&lt;/P&gt;&lt;P&gt;I'm pretty sure this is the case from those links, but can a user have multiple configurations installed at the same time? We develop multiple different Add-ins, and users can have any number installed. The Add-ins don't need to block existing Pro functionality and also don't need to affect other third-party Add-ins.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 14:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1196347#M8496</guid>
      <dc:creator>tempStephenRhea_NV5</dc:creator>
      <dc:date>2022-07-27T14:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Delete button from ribbon based on state or condition</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1196615#M8505</link>
      <description>&lt;P&gt;I guess i didn't understand your workflow correctly.&amp;nbsp; But in general, configurations allow you to modify the DAML when ArcGIS Pro starts up, but before the UI is activated.&amp;nbsp; This allows total control over the DAML content and hence the UI.&amp;nbsp; Add-ins are still loaded even if you run ArcGIS Pro with a Configuration, but you could modify the DAML of those Add-ins too (since the Add-in DAML will be included when Pro starts).&lt;/P&gt;&lt;P&gt;Now states &amp;amp; conditions can be used to control the visibility of Tabs, Groups in an Add-in (no need for a Configuration to do this).&amp;nbsp; &amp;nbsp;This ProGuide is talking about tabs and groups:&amp;nbsp; &lt;A href="https://github.com/ArcGIS/arcgis-pro-sdk/wiki/ProGuide-Ribbon-Tabs-and-Groups#groups" target="_blank" rel="noopener"&gt;ProGuide Ribbon Tabs and Groups · ArcGIS/arcgis-pro-sdk Wiki (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you use a condition on an ArcGIS Pro button you can only disable the button, but you cannot hide it (or delete it) by using a condition.&amp;nbsp; But if you add your edit button (like the 'Delete' button) to an Edit group you can hide the whole group.&amp;nbsp; To test this out i modified the 'working with daml' sample code and hooked a new group 'myEdit_group' to the existing state/condition of the sample.&amp;nbsp; I can now use the 'Toggle State' button (which changes the condition) to hide or show the 'myEdit_group':&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1658962264429.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46976i4AC28C966BE44750/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1658962264429.png" alt="Wolf_0-1658962264429.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;after the toggle:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_1-1658962309053.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46977i2722A135D21E03A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_1-1658962309053.png" alt="Wolf_1-1658962309053.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the DAML that does the work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;group id="myEdit_group" caption="My Edit Tools" keytip="X1"
               condition="example_state_condition"&amp;gt;
      &amp;lt;button refID="esri_core_saveProjectButton" /&amp;gt;
      &amp;lt;button refID="esri_core_saveProjectAsButton" /&amp;gt;
&amp;lt;/group&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this adds the group to the mapping tab:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;updateModule refID="esri_mapping"&amp;gt;
  &amp;lt;tabs&amp;gt;
    &amp;lt;updateTab refID="esri_mapping_homeTab"&amp;gt;
      &amp;lt;insertGroup refID="myEdit_group"/&amp;gt;
    &amp;lt;/updateTab&amp;gt;
  &amp;lt;/tabs&amp;gt;
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 23:00:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/delete-button-from-ribbon-based-on-state-or/m-p/1196615#M8505</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2022-07-27T23:00:16Z</dc:date>
    </item>
  </channel>
</rss>

