Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Width and Height must be non-negative. System.ArgumentException was unhandled by user code
posted

Hello,

In our XamGeographicMap component, contained within an XamRibbonWindow, if the width of the XamGeographicMap is less than the height and the mouse scroll is activated, the following exception is returned. Can you help with this?

System.ArgumentException was unhandled by user code
HResult=-2147024809
Message=Width and Height must be non-negative.
Source=WindowsBase
StackTrace:
at System.Windows.Rect..ctor(Double x, Double y, Double width, Double height)
at Infragistics.Controls.SeriesViewer.OnMouseWheel(Point pt, Double delta)
at Infragistics.Controls.SeriesViewerView.PlotArea_MouseWheel(Object sender, MouseWheelEventArgs e)
at System.Windows.Input.MouseWheelEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
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.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(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)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at System.Windows.Window.ShowDialog()
at TransPlus.FleetManager.Common.WpfInterop.ShowDialog[T](Control owner, Window child) in c:\Projects\CSharpDevelopment\Transplus.FleetManager.Common\WpfInterop.cs:line 51
at frmLocations.OpenGeocodeDialog() in c:\Projects\CSharpDevelopment\TransPlus.FleetManager\FrmLocations.cs:line 1176
at frmLocations.ConfigureGeocode_Click(Object sender, EventArgs e) in c:\Projects\CSharpDevelopment\TransPlus.FleetManager\FrmLocations.cs:line 1145
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:

Parents
No Data
Reply
  • 34850
    Offline posted

    Hello James,

    My team and I have done an initial investigation into the behavior you are seeing and at the moment, I am unable to reproduce the behavior you are seeing. I have put together a sample project with a simple XamGeographicMap in a XamRibbonWindow with a Height greater than its Width, and at the moment, I do not receive an exception when using the mouse-wheel in version 17.1.20171.2073 in Infragistics for WPF 2017.1.

    I am attaching the sample project I used to test it. While it is rather basic, I do not believe I have enough detail from your end at the moment to reliably reproduce this behavior. Would it be possible for you to please take a look and if the project does not mimic your situation, please modify it such that it does and send it back? Alternatively, if you have an isolated sample project of your own where this is reliably reproduced, would it be possible for you to please attach it so that I may see the behavior you are seeing?

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    XamRibbonWindowGeoMapTest.zip
Children
No Data