How do I “DoEvents” in WPF?

前端 未结 5 1872

I\'ve read that the C# version is as follows:

Application.Current.Dispatcher.Invoke(
          DispatcherPriority.Background,
          new Action(delegate {         


        
5条回答
  •  孤城傲影
    2020-12-15 13:31

    You could simply call this method if you want something to be refreshed on the UI:

    System.Windows.Forms.Application.DoEvents
    

    We are using it on our WPF Window and XBAP applications.

提交回复
热议问题