Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望在 WPF 窗口上触发的所有键盘事件都由 UI 线程之外的另一个线程处理。如何分离 UI 渲染和键盘捕获?
谢谢!
我不认为有任何超级优雅的方式来做到这一点,你想要的不是......
private void KeyPress(object sender, RoutedEventArgs e) { bgWorkerKeyPress.RunWorkerAsync(); }