<?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 Anyone have example C# using QueuedTask.UIScheduler? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/anyone-have-example-c-using-queuedtask-uischeduler/m-p/608202#M26998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone have example C# using QueuedTask.UIScheduler? I have a lot of code that is running in worker thread using QueuedTask.Run but need to somehow dispatch a call to update the gui in the middle of it all. Any examples using UIScheduler or C# .Net would be great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Oct 2020 22:19:52 GMT</pubDate>
    <dc:creator>ArwenVaughan1</dc:creator>
    <dc:date>2020-10-09T22:19:52Z</dc:date>
    <item>
      <title>Anyone have example C# using QueuedTask.UIScheduler?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/anyone-have-example-c-using-queuedtask-uischeduler/m-p/608202#M26998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone have example C# using QueuedTask.UIScheduler? I have a lot of code that is running in worker thread using QueuedTask.Run but need to somehow dispatch a call to update the gui in the middle of it all. Any examples using UIScheduler or C# .Net would be great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2020 22:19:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/anyone-have-example-c-using-queuedtask-uischeduler/m-p/608202#M26998</guid>
      <dc:creator>ArwenVaughan1</dc:creator>
      <dc:date>2020-10-09T22:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone have example C# using QueuedTask.UIScheduler?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/anyone-have-example-c-using-queuedtask-uischeduler/m-p/608203#M26999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arwen,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe somebody in the &lt;A href="https://community.esri.com/group/3979"&gt;ArcGIS Pro SDK&lt;/A&gt;‌ group could help...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2020 12:50:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/anyone-have-example-c-using-queuedtask-uischeduler/m-p/608203#M26999</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2020-10-12T12:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Anyone have example C# using QueuedTask.UIScheduler?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/anyone-have-example-c-using-queuedtask-uischeduler/m-p/608204#M27000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arwen,&lt;/P&gt;&lt;P&gt;You can use&amp;nbsp;BeginInvoke to execute on the UI thread.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;    &lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;onLayersAddRem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;LayerEventsArgs obj&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="comment token"&gt;//regenerate snaplist when layers are added or removed&lt;/SPAN&gt;
      &lt;SPAN class="comment token"&gt;//run on UI Thread to sync layersadded event (which runs on background)&lt;/SPAN&gt;
      System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Windows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Application&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Dispatcher&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;BeginInvoke&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Action&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;PopulateSnapList&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In this example I am updating a datagrid in a dockpane from the background thread.&lt;/P&gt;&lt;P&gt;See also:&amp;nbsp;&lt;A class="link-titled" href="https://stackoverflow.com/questions/14388136/how-to-use-begininvoke-c-sharp" title="https://stackoverflow.com/questions/14388136/how-to-use-begininvoke-c-sharp" rel="nofollow noopener noreferrer" target="_blank"&gt;How to use BeginInvoke C# - Stack Overflow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/anyone-have-example-c-using-queuedtask-uischeduler/m-p/608204#M27000</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T02:02:16Z</dc:date>
    </item>
  </channel>
</rss>

