Exception:调用线程必须为 STA,因为许多 UI 组件都需要。

报错信息 1
InvalidOperationException: 调用线程必须为 STA,因为许多 UI 组件都需要。
StackTrace:
   在 System.Windows.Input.InputManager..ctor()
   在 System.Windows.Input.InputManager.GetCurrentInputManagerImpl()
   在 System.Windows.Input.KeyboardNavigation..ctor()
   在 System.Windows.FrameworkElement.FrameworkServices..ctor()
   在 System.Windows.FrameworkElement.EnsureFrameworkServices()
   在 System.Windows.FrameworkElement..ctor()
   在 System.Windows.Controls.Panel..ctor()
   在 KkjQuicker.Overlay.Layers.ScreenshotLayer.ScreenshotCanvas..ctor(ScreenshotLayer owner)
   在 KkjQuicker.Overlay.Layers.ScreenshotLayer..ctor()
   在 DynamicClass.<Exec>d__1.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   在 System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   在 System.Threading.ThreadPoolWorkQueue.Dispatch()

版本:1.45.0 2026-03-04 19:59 Microsoft Windows NT 10.0.26200.0