InvalidCastException: 指定的转换无效。 StackTrace: 在 System.StubHelpers.InterfaceMarshaler.ConvertToNative(Object objSrc, IntPtr itfMT, IntPtr classMT, Int32 flags) 在 MS.Win32.UnsafeNativeMethods.ITfThreadMgr.SetFocus(ITfDocumentMgr docMgr) 在 System.Windows.Input.TextServicesContext.SetFocusOnDefaultTextStore() 在 System.Windows.Input.InputMethod.EnableOrDisableInputMethod(Boolean bEnabled) 在 System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp) 在 System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) 在 System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) 在 System.Windows.Input.KeyboardDevice.Focus(IInputElement element) 在 System.Windows.UIElement.Focus() 在 Quicker.View.SearchWindow.e1yTJPBc9i1(Object , EventArgs ) 在 System.Windows.Window.OnActivated(EventArgs e) 在 System.Windows.Window.WmActivate(IntPtr wParam) 在 System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)