private void onQuerySucceeded(object sender, ClientRequestSucceededEventArgs args) { user = oWebsite.CurrentUser; UpdateUIMethod updateUI = DisplayInfo; this.Dispatcher.BeginInvoke(updateUI); }
private void onQuerySucceeded(object sender, ClientRequestSucceededEventArgs args) { //The query succeeded but this method does not run in the UI thread. //We must use the Dispatcher to begin another method in the UI thread. UpdateUIMethod updateUI = DisplayInfo; this.Dispatcher.BeginInvoke(updateUI); }