Why is my GUI freezing?

前端 未结 2 1610
梦谈多话
梦谈多话 2021-01-20 04:04

I\'m new in TPL world, and I did that code:

    var myItems = myWpfDataGrid.SelectedItems;

    this.Dispatcher.BeginInvoke(new Action(() =>
    {
                


        
2条回答
  •  感情败类
    2021-01-20 04:22

    I had a hunch that something working with serial port would try to use application's event loop to do it's work. So it actually bypasses the whole dispatcher and thread system and blocks the application. I'm not experienced in this field so I don't know how to solve it, but this is different question.

提交回复
热议问题