Multiple calls to data service from SL3?

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-05-29T04:03:56Z Indexed on 2010/05/29 4:12 UTC
Read the original article Hit count: 296

I have an SL3 that makes asynchronous calls to a data service. Basically, there is a treeview that is bound to a collection of objects. The idea is that as a user selects a specific treeviewitem, a call is made to the data service, with a parameter specific to the selected treeviewitem being passed to the corresponding web method in the data service. The data service returns data back to the SL3 client, and the client presents the data to the user.

This works well. The problem is that when users start to navigate through the treeview using the arrow keys on their keyboard, they could press the down arrow key, for example, 10 times, and 10 calls will be made to the data service, and then each of the 10 items will be displayed to the user momentarily, until finishing with the data for the most recently selected treeview item.

So - onto the question. How can I put in some form of delay, to allow someone to navigate quickly through a treeview, then, once then stop at a certain treeviewitem, a call is made to the data service?

Thanks for any suggestions.

Chris

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about silverlight-3.0