.net – MethodInvoker in WPF

netwinformswpf

Is there any in-built delegate like System.Windows.Forms.MethodInvoker for WPF ?

I was porting some functionality from WinForms to WPF, for this I was not wising to import winforms reference, is there any corresponding delegate in WPF ?

Best Answer

You can use just like this;

Dispatcher.BeginInvoke(new Action(delegate
  {
    // Do your work
  }));