Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Dispatcher in non UI code windows phone 8

I can get the CoreDispatcher object in windows 8 as

CoreDispatcher dispatcher = Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher;

But how can I get the Dispatcher in windows phone 8
So that I can call

Dispatcher.BeginInvoke(delegate
{
    //My statements
});
like image 628
Inder Kumar Rathore Avatar asked Mar 01 '13 08:03

Inder Kumar Rathore


1 Answers

Use Deployment.Current.Dispatcher to get the Dispatcher object in Windows Phone.

like image 183
Pedro Lamas Avatar answered Nov 11 '22 16:11

Pedro Lamas