I'm using the WPF version of OxyPlot.
I have the plot in the top half of a view (screen) with a grid splitter between the top & bottom halfs. When move the grid splitter to the top of the view, so that the plot has no visible area I received the following argument out of range exception.
This is being caused by the constructor of the OxyRect object, this IMO is a bug because all other (WPF) controls are able to cope with resizing to zero or less dynamically when using grid splitter.
2014-05-28 15:01:14.8450 8 ERROR Calibration.UI.App System.ArgumentOutOfRangeException: The height should not be negative.
Parameter name: height
at OxyPlot.OxyRect..ctor(Double left, Double top, Double width, Double height)
at OxyPlot.PlotModel.UpdatePlotArea(IRenderContext rc)
at OxyPlot.PlotModel.Render(IRenderContext rc, Double width, Double height)
at OxyPlot.Wpf.Plot.UpdateVisuals()
at OxyPlot.Wpf.Plot.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Comments: I cannot reproduce this, see the WPF ResizeDemo I just added. Can you create an example that reproduces the exception?
I have the plot in the top half of a view (screen) with a grid splitter between the top & bottom halfs. When move the grid splitter to the top of the view, so that the plot has no visible area I received the following argument out of range exception.
This is being caused by the constructor of the OxyRect object, this IMO is a bug because all other (WPF) controls are able to cope with resizing to zero or less dynamically when using grid splitter.
2014-05-28 15:01:14.8450 8 ERROR Calibration.UI.App System.ArgumentOutOfRangeException: The height should not be negative.
Parameter name: height
at OxyPlot.OxyRect..ctor(Double left, Double top, Double width, Double height)
at OxyPlot.PlotModel.UpdatePlotArea(IRenderContext rc)
at OxyPlot.PlotModel.Render(IRenderContext rc, Double width, Double height)
at OxyPlot.Wpf.Plot.UpdateVisuals()
at OxyPlot.Wpf.Plot.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Comments: I cannot reproduce this, see the WPF ResizeDemo I just added. Can you create an example that reproduces the exception?