Dispatcher in WPF ViewModel Class
I am using a dispatcher in one of my WPF code behind but now moving all
code behind to MVVM pattern with below code:
this.Dispatcher.BeginInvoke(new Action(() => CallEmployee()));
Thread.Sleep(100000);
but the same is not available from a ViewModel Class file. I tried
System.Windows.Threading.CurrentDispatcher.BeginInvoke(new Action(() =>
CallEmployee()));
Thread.Sleep(100000);
but its not calling CallEmployee method.
No comments:
Post a Comment