基本上我需要知道是否我需要可以Dispatcher.BeginInvoke,或者如果它是没有必要的。
Basically I need to know whether I need to can Dispatcher.BeginInvoke or if it's not needed.
感谢。
您可以使用 Dispatcher.CheckAccess
方法。如果你在同一个线程的UI调度它返回true,否则为假
You can use the Dispatcher.CheckAccess
method. It returns true if you're on the same thread as the UI dispatcher, and false otherwise