<?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 Customize Menu Programmatically in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customize-menu-programmatically/m-p/855320#M4471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to programmatically change the caption of a custom menu?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a menu in my Config.daml as so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;menus&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;menu id="MyMenu" caption="Initial Caption" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png"&amp;gt;&lt;BR /&gt; &amp;lt;tooltip heading="Tooltip Heading"&amp;gt;&lt;BR /&gt;Initial Tooltip&amp;lt;disabledText /&amp;gt;&lt;BR /&gt; &amp;lt;/tooltip&amp;gt;&lt;BR /&gt; &amp;lt;button refID="button1" /&amp;gt;&lt;BR /&gt; &amp;lt;button refID="button2" /&amp;gt;&lt;BR /&gt; &amp;lt;/menu&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/menus&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then after a button is clicked I try to change the menu's caption using the following code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;IPlugInWrapper menu = FrameworkApplication.GetPlugInWrapper("&lt;SPAN style="background-color: #f6f6f6;"&gt;MyMenu&lt;/SPAN&gt;");&lt;BR /&gt; menu.Caption = "New Caption";&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;When running the Add-In I see no change in the menu's caption in the UI, but inspecting with the debugger shows that the caption value does get changed in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested the above approach on buttons, and in that case I can alter the caption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2020 18:34:44 GMT</pubDate>
    <dc:creator>MitchellKollodge</dc:creator>
    <dc:date>2020-06-24T18:34:44Z</dc:date>
    <item>
      <title>Customize Menu Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customize-menu-programmatically/m-p/855320#M4471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to programmatically change the caption of a custom menu?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a menu in my Config.daml as so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;menus&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;menu id="MyMenu" caption="Initial Caption" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png"&amp;gt;&lt;BR /&gt; &amp;lt;tooltip heading="Tooltip Heading"&amp;gt;&lt;BR /&gt;Initial Tooltip&amp;lt;disabledText /&amp;gt;&lt;BR /&gt; &amp;lt;/tooltip&amp;gt;&lt;BR /&gt; &amp;lt;button refID="button1" /&amp;gt;&lt;BR /&gt; &amp;lt;button refID="button2" /&amp;gt;&lt;BR /&gt; &amp;lt;/menu&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/menus&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then after a button is clicked I try to change the menu's caption using the following code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;IPlugInWrapper menu = FrameworkApplication.GetPlugInWrapper("&lt;SPAN style="background-color: #f6f6f6;"&gt;MyMenu&lt;/SPAN&gt;");&lt;BR /&gt; menu.Caption = "New Caption";&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;When running the Add-In I see no change in the menu's caption in the UI, but inspecting with the debugger shows that the caption value does get changed in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested the above approach on buttons, and in that case I can alter the caption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2020 18:34:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customize-menu-programmatically/m-p/855320#M4471</guid>
      <dc:creator>MitchellKollodge</dc:creator>
      <dc:date>2020-06-24T18:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Menu Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/customize-menu-programmatically/m-p/855321#M4472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mitchell&lt;/P&gt;&lt;P&gt;This is a bug. The good news is that it is now fixed and will be available with 2.7. Thanks for catching this error and reporting it.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2020 15:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/customize-menu-programmatically/m-p/855321#M4472</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2020-06-25T15:30:54Z</dc:date>
    </item>
  </channel>
</rss>

