private void sendnote_btn_Click(object sender, RoutedEventArgs e) { try { Evennote.SyncNotes(); //Dispatcher.BeginInvoke(new ThreadStart(Evennote.SyncNotes)); //Executes the specified delegate asynchronously with the specified arguments, at the specified priority, on the thread that the Dispatcher was created on. RefreshStatusBackup(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }