Select to view content in your preferred language

RenderCompleted Event?

778
1
01-25-2011 02:34 AM
stefanschlaefli
Regular Contributor
Hi
I'm using a featurelayer that renders data of a mapit spatial data service. In my solution, the user can dynamically connect to any database and display data of any spatial table.  When I load data from a table with lots of records it may take some time until they show up on the map. First the featurelayer downloads the data, then the updateCompleted event is raised (all data has been downstreamed to the client). Then it may still take some seconds until the geometries get displayed in the map control. Is there any event, something like a RenderCompleted event that I can register to notify the user when all data is displayed in the map control? Or some workaround?

After all when I work with the feature clusterer with the featurelayer being in onDemand mode, i cannot give feedback to the user when all the data in the visible extent is finished rendering.
Thanks for any ideas
Stefan
0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor
Currently the is no event off the map control (the map doesn't even know - it's all handed off to Silverlight at this point).
You might be able to use the static CompositionTarget.Rendering event. This fires every time a frame goes to screen.
Hook up to it when UpdateCompleted fires. When it fires the first time make sure you unhook from it again (VERY important - big overhead when constantly listening to it). The first time it fires, the rendering step should be complete. (it might take a frame more before you actually see it, but this should be in the milliseconds range).
0 Kudos