Inder Kumar Rathore
Inder Kumar Rathore

Reputation: 40018

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
});

Upvotes: 16

Views: 10287

Answers (1)

Pedro Lamas
Pedro Lamas

Reputation: 7243

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

Upvotes: 23

Related Questions