The problem is that you aren’t providing the exact type of delegate you want to invoke. Dispatcher.Invoke
just takes a Delegate
. Is it an Action<T>
? If so, what is T
? Is it a MethodInvoker
? Action
? What?
If your delegate takes no arguments and returns nothing, you can use Action
or MethodInvoker
. Try this:
_uiDispatcher.Invoke(new Action(() => { }));