Win32Exception: 当前程序已使用了 Window 管理器对象的系统允许的所有句柄。 --NativeErrorCode: 1158 StackTrace: 在 MS.Win32.SafeNativeMethods.SetTimer(HandleRef hWnd, Int32 nIDEvent, Int32 uElapse) 在 System.Windows.Threading.Dispatcher.SetWin32Timer(Int32 dueTimeInTicks) 在 System.Windows.Threading.Dispatcher.UpdateWin32TimerFromDispatcherThread(Object unused) 在 System.Windows.Threading.Dispatcher.AddTimer(DispatcherTimer timer) 在 System.Windows.Threading.DispatcherTimer.Restart() 在 System.Windows.Threading.DispatcherTimer.Start() 在 System.Windows.Documents.TextEditorTyping._FlushPendingInputItems(TextEditor This) 在 System.Windows.Documents.TextEditor.OnLostFocus(Object sender, RoutedEventArgs e) 在 System.Windows.Controls.Primitives.TextBoxBase.OnLostFocus(RoutedEventArgs e) 在 System.Windows.UIElement.IsFocused_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e) 在 System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 在 System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 在 System.Windows.Controls.TextBox.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 在 System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) 在 System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) 在 System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata) 在 System.Windows.DependencyObject.ClearValue(DependencyPropertyKey key) 在 System.Windows.Input.FocusManager.OnFocusedElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 在 System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 在 System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) 在 System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) 在 System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) 在 System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) 在 System.Windows.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value) 在 System.Windows.FrameworkElement.OnPresentationSourceChanged(Boolean attached) 在 System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot) 在 System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value) 在 System.Windows.Window.SourceWindowHelper.ClearRootVisual() 在 System.Windows.Window.CloseWindowFromWmClose() 在 System.Windows.Window.WmClose() 在 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)