How to execute code in the GUI Thread?

前端 未结 6 1088
我在风中等你
我在风中等你 2021-01-12 03:56

I have a FileSystemWatcher that react on the Changed event.

I want to open the file, read its content display it in a textbox and hide the popup that has been create

6条回答
  •  隐瞒了意图╮
    2021-01-12 04:04

    This will give you the Window dispatcher:

    Dispatcher.CurrentDispatcher
    

    As long as you get it on the windows thread.

提交回复
热议问题