<?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: GraphicsLayer.ToBitmap() issue in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175926#M4384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there any event that is rised when a GraphicsLayer is rendered? How to know when I can call ToBitmap?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure you need an event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you try to call ToBitMap by using the Dispatcher, i.e.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dispatcher.BeginInvoke(()=&amp;gt; { your call to ToBitMap });&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Dec 2011 09:19:33 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2011-12-07T09:19:33Z</dc:date>
    <item>
      <title>GraphicsLayer.ToBitmap() issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175925#M4383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I create a graphic, add it to the GraphicsLayer and call GraphicsLayer.ToBitmap(), there is no my new graphic in the bitmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I call ToBitmap later (using timer, for example), then the graphic is there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like the rendering of GraphicsLayers is async.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any event that is rised when a GraphicsLayer is rendered? How to know when I can call ToBitmap?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 06:53:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175925#M4383</guid>
      <dc:creator>DenisT</dc:creator>
      <dc:date>2011-12-07T06:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer.ToBitmap() issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175926#M4384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there any event that is rised when a GraphicsLayer is rendered? How to know when I can call ToBitmap?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure you need an event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you try to call ToBitMap by using the Dispatcher, i.e.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dispatcher.BeginInvoke(()=&amp;gt; { your call to ToBitMap });&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 09:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175926#M4384</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-12-07T09:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer.ToBitmap() issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175927#M4385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dispatcher not worked for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached a simple VS-solution, that shows a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are two main buttons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"ToBitmap" button creates a new graphic, refreshes a GraphicsLayer and calls GraphicsLayer.ToBitmap().&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There will be no new graphic point in the bitmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"ToBitmap() delayed" button will add a new graphic, make a delay using DispatcherTimer and then call GraphicsLayer.ToBitmap().&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It works. However you never know how long the graphics layer refreshes itself.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2011 10:21:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175927#M4385</guid>
      <dc:creator>DenisT</dc:creator>
      <dc:date>2011-12-07T10:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer.ToBitmap() issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175928#M4386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Dispatcher not worked for me.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Right. But 2 levels of dispatcher look working:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Consolas;"&gt;Dispatcher.BeginInvoke(() =&amp;gt; Dispatcher.BeginInvoke(CreateBitmap));&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-size: 2; font-family: Tahoma;"&gt;Don't ask me why:confused: but t&lt;/SPAN&gt;&lt;SPAN style="font-family:Consolas;"&gt;&lt;SPAN style="font-size: 2; font-family: Tahoma;"&gt;hat may be a workaround. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size:2;"&gt;&lt;SPAN style="font-family:Tahoma;"&gt;I don't know any other event to do that. &lt;/SPAN&gt;&lt;SPAN style="font-family:Tahoma;"&gt;You may try CompositionTarget.Rendering but likely not a good solution either.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2011 07:59:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175928#M4386</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-12-09T07:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer.ToBitmap() issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175929#M4387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2011 16:04:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/graphicslayer-tobitmap-issue/m-p/175929#M4387</guid>
      <dc:creator>DenisT</dc:creator>
      <dc:date>2011-12-09T16:04:02Z</dc:date>
    </item>
  </channel>
</rss>

