<?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: Changing theme dynamically in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1266989#M6442</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you find a solution?&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 13 Mar 2023 09:49:47 GMT</pubDate>
    <dc:creator>aa_GIS</dc:creator>
    <dc:date>2023-03-13T09:49:47Z</dc:date>
    <item>
      <title>Changing theme dynamically</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1261932#M6299</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've recently created a custom theme and widget that allows users to toggle between light and dark modes. However, I am facing an issue in changing themes from a button click during runtime using the ArcGIS API. I have tried using ThemeProvider, ThemeContext, ThemeManager, and jimu-for-test versions, but I'm unable to update the colors of the desired theme on the page.&lt;/P&gt;&lt;P&gt;I understand that a similar post was made about a year ago,&lt;LI-MESSAGE title="Dynamic theme change" uid="1171056" url="https://community.esri.com/t5/arcgis-experience-builder-questions/dynamic-theme-change/m-p/1171056#U1171056" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;, but unfortunately, there are still no responses to it.&lt;/P&gt;&lt;P&gt;I'm not very familiar with React and the Jimu packages, and the documentation on these functions is not very clear. So, I would appreciate any help or guidance that you can provide.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 09:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1261932#M6299</guid>
      <dc:creator>JonathanAttard</dc:creator>
      <dc:date>2023-02-27T09:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Changing theme dynamically</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1266989#M6442</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you find a solution?&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 09:49:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1266989#M6442</guid>
      <dc:creator>aa_GIS</dc:creator>
      <dc:date>2023-03-13T09:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Changing theme dynamically</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1268775#M6474</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Based on my understanding, you have create a custom theme and want to be able to change theme at runtime right? But your problem is to change apply the theme on the fly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure if you have follow the ExB theme development guides, but here are some tutorial and sample code that might help.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/experience-builder/guide/theme-development/" target="_blank"&gt;https://developers.arcgis.com/experience-builder/guide/theme-development/&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/experience-builder/sample-code/themes/demo-theme/" target="_blank"&gt;https://developers.arcgis.com/experience-builder/sample-code/themes/demo-theme/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 21:35:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1268775#M6474</guid>
      <dc:creator>Wei_Ying</dc:creator>
      <dc:date>2023-03-16T21:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Changing theme dynamically</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1269336#M6489</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the sample and created custom themes just fine! I want to switch between themes using a button, that's my issue now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 05:04:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1269336#M6489</guid>
      <dc:creator>aa_GIS</dc:creator>
      <dc:date>2023-03-20T05:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Changing theme dynamically</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1271608#M6545</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found a solution,&lt;/P&gt;&lt;P&gt;in ur widget.tsx use:&lt;/P&gt;&lt;P&gt;appConfig.theme = [the new theme]&lt;/P&gt;&lt;P&gt;props.dispatch(appActions.widgetStatePropChange("r", "r", appConfig.theme))&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Mar 2023 07:19:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1271608#M6545</guid>
      <dc:creator>aa_GIS</dc:creator>
      <dc:date>2023-03-25T07:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Changing theme dynamically</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1272336#M6559</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, that's exactly what I needed.&lt;/P&gt;&lt;P&gt;I should note that I got the 'appConfig' from:&lt;BR /&gt;import '&lt;SPAN&gt;getAppStore,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;appActions&lt;/SPAN&gt;&lt;SPAN&gt;' from 'jimu-core'&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;appConfig&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;getAppStore&lt;/SPAN&gt;&lt;SPAN&gt;().&lt;/SPAN&gt;&lt;SPAN&gt;getState&lt;/SPAN&gt;&lt;SPAN&gt;().&lt;/SPAN&gt;&lt;SPAN&gt;appConfig&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;BR /&gt;&lt;BR /&gt;For the '&lt;/SPAN&gt;&lt;SPAN&gt;appConfig&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;theme' I just entered the URI of the theme, for example: 'themes/default/'&lt;BR /&gt;&lt;BR /&gt;Again, thank you so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 09:17:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1272336#M6559</guid>
      <dc:creator>JonathanAttard</dc:creator>
      <dc:date>2023-03-28T09:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Changing theme dynamically</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1368624#M10230</link>
      <description>&lt;P&gt;I have users asking for this. Any Chance you could share the custom theme?&lt;/P&gt;&lt;P&gt;Otherwise I am just going to recreate everything in another page and have a link at the top.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 21:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1368624#M10230</guid>
      <dc:creator>MicahWilliamson</dc:creator>
      <dc:date>2024-01-10T21:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Changing theme dynamically</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1379558#M10749</link>
      <description>&lt;P&gt;Hi, hopefully it's not too late.&lt;BR /&gt;&lt;BR /&gt;All you need is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy one of the themes from 'client\dist\themes' to 'client\your-extensions\themes'.&lt;/LI&gt;&lt;LI&gt;Modify the manifest.json 'name' to match the new folder name within your-extensions.&lt;/LI&gt;&lt;LI&gt;Modify the theme from the files.&lt;/LI&gt;&lt;LI&gt;Use the code by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/599789"&gt;@aa_GIS&lt;/a&gt;&amp;nbsp;to then switch between themes.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { getAppStore } from 'jimu-core'

var newTheme = "themes/DarkMine/" // 'DarkMine' is the new folder name in your-packages/themes 

const appConfig = getAppStore().getState().appConfig;
appConfig.theme = newTheme
dispatch(appActions.widgetStatePropChange("r", "r", appConfig.theme))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 08:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/changing-theme-dynamically/m-p/1379558#M10749</guid>
      <dc:creator>JonathanAttard</dc:creator>
      <dc:date>2024-02-08T08:53:03Z</dc:date>
    </item>
  </channel>
</rss>

