i binding itemssource observablecollection code below
services.restservices.getnotifications(userid, ++page).continuewith((task) => { dispatcher.begininvoke((action)(() => { setnotlisttobind(task.result).continuewith(t => { dispatcher.begininvoke((action)(() => { var list = getfilterednotlist(notlist, notificationcategories.requests); dispatcher.begininvoke(() => notificationcontainer.itemssource = list;); })); }); })); }); in above code using task-parallel-library wait excecution , within binding itemssource dispature, ui not updating after binding.
here itemssource notificationcontainer , observablecollection list
if know services.restservices.getnotifications being called ui thread, simplify code specifying taskscheduler instance on each call continuewith using taskscheduler.fromcurrentsyncronizationcontext. perhaps can lead closer finding issue.
Comments
Post a Comment