silverlight - Approach to loading forms and busy indicator -


i "slowly" moving silverlight asp.net , have question how deal situation code needs executed after web service calls have completed. example, when user clicks on row in data grid dialog box shown allows editing of record. contains numerous combo boxes, check boxes etc. need first load data each of combo boxes, , when finished loading, need set bound entity. since new async thing, thinking have kind of counter keep track on how many calls have been dispatched, , finish reduce them one, until zero, @ point raise event load has finished, , proceed ever dependent on this. seems clunky way of doing it. sure many have faced issue, how do this. if helps, use prism mvvm approach , ria services dtos.

what you've described pretty way go. there may more elegant things can locks , mutexes, counter work. has bonus can see how many operations still "in progress" @ 1 time.

you dispatch events sequentially defeat whole purpose of asynchronous operations.

if analysed each part of ui needs might able operations before all of async events have finished. making sure start longest running operations first might - there's no guarantee other shorter operations finish first. depends on resources available on both client , server @ time call made.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -