InvalidOperationException: 对象的当前状态使该操作无效。 StackTrace: 在 MS.Win32.Penimc.UnsafeNativeMethods.CheckedLockWispObjectFromGit(UInt32 gitKey) 在 System.Windows.Input.PenThreadWorker.AddPenContext(PenContext penContext) 在 System.Windows.Input.PenThreadWorker.WorkerOperationAddContext.OnDoWork() 在 System.Windows.Input.PenThreadWorker.WorkerOperation.DoWork() 在 System.Windows.Input.PenThreadWorker.ThreadProc() 在 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.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Threading.ThreadHelper.ThreadStart()