c# WPF Аналог Delphi Application.ProcessMessages и WinForms Application.DoEvents


  1. private void DoEvents()   
  2. {   
  3.     Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate { }));   
  4. }   
  5.   
  6. private void btnDel_Click(object sender, RoutedEventArgs e)   
  7. {   
  8.     popupLoad.IsOpen = true;   
  9.     DoEvents();   
  10.     if (eDelRecord != null)   
  11.         eDelRecord(this, EventArgs.Empty);   
  12.     popupLoad.IsOpen = false;   
  13. }  

No comments:

Post a Comment

Note: only a member of this blog may post a comment.