How to execute code in the GUI Thread?

前端 未结 6 1092
我在风中等你
我在风中等你 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:00

    Just wrap extendedNotifyIcon_OnHideWindow(); into a Dispatcher.Invoke()

    But I would rather do it (all im XAML) using an Animation and with an EvenTrigger that triggers upon the TimeLine.Completed event.

提交回复
热议问题