标签: c# reflection
有没有办法通过反射从类库中获取应用程序调度程序?我尝试过的任何事情都没有奏效。
答案 0 :(得分:2)
您可以致电System.Windows.Application.Current.Dispatcher
System.Windows.Application.Current.Dispatcher
您需要添加对PresentationFramework,WindowsBase,System.Xaml的引用,以便从普通的类库中访问Application类。
PresentationFramework
WindowsBase
System.Xaml
Application