private void SLImport_DoWork(object sender, DoWorkEventArgs e) { //Process Marking //ProcessWorker.RunWorkerAsync(); inkC.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate() { inkC.Background = Brushes.White; })); myProcess.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate() { myProcess.Show(); })); Thread.Sleep(200); string path = System.IO.Path.GetTempPath(); string fileName = path + "\\HandImage.jpg"; //string fileName = @"D:\HandImage.bmp"; inkC.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate() { //inkC.Background = Brushes.White; myPaint.ExportToImage(fileName); inkC.Background = Brushes.Transparent; })); SLMgr.NewJob(); //Thread.Sleep(2000); SLMgr.ImportImage(fileName, tmpDither); //inkC.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, // new Action(delegate() // { // inkC.Background = Brushes.Transparent; // })); }