Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                {
                   // your code here 

}));