Select to view content in your preferred language

Issue with LayerCollection::LayersInitialized event.

964
5
02-14-2011 02:38 AM
SanajyJadhav
Deactivated User
Hi,

I want to show a Silverlight progress bar on a child window (to make it modal) till all services in my application load. I cannot find any event to hook for this task.

LayerCollection::LayersInitialized event finishes to early and still services keep initializing. I want to restrict the user from doing anything in this time. He must see a modal progress bar only.

Can anybody let me know the right event for this? Any help is appreciated.

I am not using any cached services in my application as of now, all are dynamic.But, in future, I might add cached satellite imagery also.

Regards,
Sanjay.
0 Kudos
5 Replies
JenniferNery
Esri Regular Contributor
0 Kudos
SanajyJadhav
Deactivated User
Jenn, Thanks  for the reply.

I went through the documentation and implemented in the code.But, still I can't understand how to use the value of the property Progress on the incoming arguments.

As per the documentation, the value would be between 0 and 100.So, does it mean, when value is 100, all layers are fully initialized and images for the map is ready to be displayed and I  should disable my progress bar.

Can you please shade some light on this?

-Sanjay.
0 Kudos
JenniferNery
Esri Regular Contributor
As per the documentation, the value would be between 0 and 100.So, does it mean, when value is 100, all layers are fully initialized and images for the map is ready to be displayed and I should disable my progress bar.


Yes, this is correct. It is the same event ProgressBar from the Toolkit is using: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MapProgressBar. But since this control is not modal as you need in your application, you can simply listen for the same event. The source code for the Toolkit is also available in CodePlex, should you need to download and see how it works: http://esrisilverlight.codeplex.com/
0 Kudos
SanajyJadhav
Deactivated User
Thanks Jenn.

You have been great help. I really appreciate it.

I did it successfully by simply putting Silverlight progressbar on ChildWindow and hooking to the event you suggested. Now our UI designer would take care of making it good looking.

-Sanjay.
0 Kudos
HamidMokdes
Occasional Contributor
The LayerCollection::LayersInitialized is not firing in my case at all.

Is this event fired only in case all layers are properly initialized [no initialization failure occurred] or is it fired no matter how individual layers initialization state is as suggested by the documentation ?

Thanks.
0 Kudos