Win32Exception: 当前程序已使用了 Window 管理器对象的系统允许的所有句柄。 --NativeErrorCode: 1158 StackTrace: at MS.Win32.SafeNativeMethods.SetTimer(HandleRef hWnd, Int32 nIDEvent, Int32 uElapse) at System.Windows.Threading.Dispatcher.SetWin32Timer(Int32 dueTimeInTicks) at System.Windows.Threading.Dispatcher.UpdateWin32TimerFromDispatcherThread(Object unused) at System.Windows.Threading.Dispatcher.AddTimer(DispatcherTimer timer) at System.Windows.Threading.DispatcherTimer.Restart() at System.Windows.Threading.DispatcherTimer.Start() at System.Windows.Threading.DispatcherTimer.set_IsEnabled(Boolean value) at System.Windows.Input.InputManager.InvalidateInputDevices() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Interop.HwndTarget.OnResize() at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)