Posted 16 September 2025, 11:27 pm EST
Hello,
We are using C1.WPF.Docking 4.6.20233.801 and have encountered a recurring crash in C1DockControlPanel.ArrangeOverride.
The exception is:
System.ArgumentException: Width and Height must be non-negative.
at System.Windows.Rect…ctor(Double x, Double y, Double width, Double height)
at C1.WPF.Docking.C1DockControlPanel.ArrangeOverride(Size finalSize)
This occurs when a C1DockTabControl is docked with DockMinHeight=“0” (or DockMinWidth=“0”) and the application is running on a laptop with 125% DPI scaling. In these cases, the internal layout tree (Node._0023fmd) sometimes calculates a negative width/height (e.g. -0.5), which results in the Rect constructor throwing.
It does not happen consistently, but it is reproducible on some machines when resizing or docking/undocking at non-100% DPI.
Steps to Reproduce:
Use C1DockControl with a C1DockTabControl configured as:
<c1:C1DockTabControl Dock="Left" DockMode="Docked" MinWidth="65" MinHeight="30" DockMinWidth="65" DockMinHeight="0" />
Run on Windows with 125% display scaling.
Resize the window or drag splitters to force layout recalculation.
Occasionally, the application crashes with ArgumentException.
Expected Behavior:
The DockControl should never produce a negative width/height during arrange. Negative values should be clamped to 0 internally, avoiding exceptions.
Questions:
Has this bug already been fixed in a later version of ComponentOne WPF Docking?
If yes, in which version was the fix included?
If not yet fixed, is there a recommended workaround or hotfix?
Environment:
ComponentOne WPF Docking 4.6.20233.801
.NET Framework 4.8.1
Windows 10/11 laptops with 125% display scaling