-
Notifications
You must be signed in to change notification settings - Fork 410
Closed
Description
Hi.
First of all, thanks for the great library, works perfectly.
Unfortunately sometimes this error occurs:
"The parameter value must be greater than zero.\r\nParameter name: pixelWidth"
at System.Windows.Media.Imaging.RenderTargetBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat)
at GongSolutions.Wpf.DragDrop.DragDrop.CaptureScreen(Visual target, FlowDirection flowDirection, Double dpiX, Double dpiY) in d:\projects\git\gong-wpf-dragdrop\GongSolutions.Wpf.DragDrop\DragDrop.cs:line 502
at GongSolutions.Wpf.DragDrop.DragDrop.CreateDragAdorner() in d:\projects\git\gong-wpf-dragdrop\GongSolutions.Wpf.DragDrop\DragDrop.cs:line 432
at GongSolutions.Wpf.DragDrop.DragDrop.DropTarget_PreviewDragOver(Object sender, DragEventArgs e) in d:\projects\git\gong-wpf-dragdrop\GongSolutions.Wpf.DragDrop\DragDrop.cs:line 857
at GongSolutions.Wpf.DragDrop.DragDrop.DropTarget_PreviewDragEnter(Object sender, DragEventArgs e) in d:\projects\git\gong-wpf-dragdrop\GongSolutions.Wpf.DragDrop\DragDrop.cs:line 825
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
at System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDragEnter(Object data, Int32 dragDropKeyStates, Int64 point, Int32& effects)
After such error UI is unresponsive until user minimizes and restores application.