title: Silverlight application not become Idle when using asynchronous AJAX
body: <p>I'm currently working with a Silverlight 5 application that supports two-way communication between itself and JavaScript. The Silverlight application is responsible for rendering 3D content and the JavaScript is responsible for collecting and preparing the data for rendering.</p>
  
  <p>The problem I am faced with, is that the Silverlight 5 DrawingSurface only re-draws after the DrawingSurface is invalidated and the application becomes Idle. Unfortunately, when downloading the data that I require from the server using asynchronous AJAX requests, the DrawingSurface does not re-draw until all of the data has been downloaded (despite invalidating the DrawingSurface after each piece of data has been downloaded).</p>
  
  <p>I understand this, but what confuses me is that when I do exactly the same style of asynchronous download requests using the WebClient within Silverlight, the DrawingSurface successfully re-draws after most of the invalidation calls.</p>
  
  <p>Originally, I thought this might have been due to some threading issue, but all calls (and callbacks) operate on the same thread. I've tried using both jQuery's AJAX API and writing my own XmlHttpRequest handler in JavaScript; but I get the same result both ways. I originally noticed that jQuery was returning the data in the same order that I was requesting it in (whereas Silverlight's WebClient was not), which is what lead me to creating my own XmlHttpRequest handler as I thought that re-ordering might have caused the script to remain active during asynchronous calls.</p>
  
  <p>Has anyone had this issue before and/or does anyone have any suggestions for workarounds/fixes?</p>