3

I am trying to add an item to a sharepoint list but when i try to save my changes im getting this error with my Dispatcher.BeginInvoke 'Windows.UI.Core.CoreDispatcher' does not contain a definition for 'BeginInvoke' and no extension method 'BeginInvoke' accepting a first argument of type 'Windows.UI.Core.CoreDispatcher' could be found (are you missing a using directive or an assembly reference?

 ctx.BeginSaveChanges(
  (IAsyncResult result) => Dispatcher.BeginInvoke(
      () => ctx.EndSaveChanges(result)),
   ctx

);

Page F.P.T
  • 653
  • 4
  • 11
  • 24

1 Answers1

1

Should use the following instead:

await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => {
}
Yuchen
  • 30,852
  • 26
  • 164
  • 234