<?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: Force redraw of formatting panel in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Force-redraw-of-formatting-panel/m-p/4083185#M10273</link>
    <description>&lt;P&gt;Excellent! I have been looking for a way to dynamically update data in the drop-down list of the formatting panel for a long time. Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Aug 2024 05:56:22 GMT</pubDate>
    <dc:creator>Covid19</dc:creator>
    <dc:date>2024-08-06T05:56:22Z</dc:date>
    <item>
      <title>Force redraw of formatting panel</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Force-redraw-of-formatting-panel/m-p/4075418#M10236</link>
      <description>&lt;P&gt;Not sure if I'm missing something obvious or if I'm doing something I'm not supposed to...&lt;/P&gt;&lt;P&gt;In my custom visual I allow my users to upload some pictures in Advanced Edit mode, and later on I'd like to allow them to select these pictures in the formatting panel in a drop-down.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm able to implement all of this, the only problem is that I need to resize my visual to trigger a redraw of the formatting panel so the content of the drop-down is actually updated. I tried explicitly calling getFormattingModel(), but it makes no difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I put together a simplified project to demo this behavior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps to reproduct the problem:&lt;/P&gt;&lt;P&gt;1. Start the visual, and navigate to the formatting panel: see that the "Default color" formatting slice is disabled&lt;/P&gt;&lt;P&gt;2. Click the "Populate dropdown values" button on the visual itself: see that the array that previously showed empty is now showing some values on the visual. The "Default colors" formatting slice is still disabled&lt;/P&gt;&lt;P&gt;3. Resize the visual: this will trigger a re-initialization of the formatting settings, and now "Default color" becomes enabled, and the drop-down has the same values as the array.&lt;/P&gt;&lt;P&gt;Source code is here:&amp;nbsp;&lt;A href="https://github.com/DanielSzentimrey-Harrach/formatPaneUpdateExample/tree/master" target="_blank" rel="noopener"&gt;https://github.com/DanielSzentimrey-Harrach/formatPaneUpdateExample/tree/master&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, my question is how to trigger the formatting panel redraw programmatically, without the need to resize my visual.&lt;/P&gt;&lt;P&gt;I looked at this page in the documentation, but still couldn't figure out how to do it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/power-bi-visuals-concept" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/power-bi/developer/visuals/power-bi-visuals-concept&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 08:03:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Force-redraw-of-formatting-panel/m-p/4075418#M10236</guid>
      <dc:creator>DanielSH</dc:creator>
      <dc:date>2024-08-02T08:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Force redraw of formatting panel</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Force-redraw-of-formatting-panel/m-p/4078160#M10255</link>
      <description>&lt;P&gt;Answering my own question: after some more digging around I found that the IVisualHost interface contains a function called refreshHostData(); Calling this function programmatically will lead to a redraw of the formatting panel without the need to resize the visual.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Aug 2024 07:12:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Force-redraw-of-formatting-panel/m-p/4078160#M10255</guid>
      <dc:creator>DanielSH</dc:creator>
      <dc:date>2024-08-04T07:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Force redraw of formatting panel</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Force-redraw-of-formatting-panel/m-p/4083185#M10273</link>
      <description>&lt;P&gt;Excellent! I have been looking for a way to dynamically update data in the drop-down list of the formatting panel for a long time. Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 05:56:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Force-redraw-of-formatting-panel/m-p/4083185#M10273</guid>
      <dc:creator>Covid19</dc:creator>
      <dc:date>2024-08-06T05:56:22Z</dc:date>
    </item>
  </channel>
</rss>

