diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBarTray.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBarTray.cs index cbb784ce52c..137dff4864f 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBarTray.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/ToolBarTray.cs @@ -360,7 +360,7 @@ protected override Size MeasureOverride(Size constraint) { ToolBar toolBar = band[toolBarIndex]; remainingLength -= toolBar.MinLength; - if (DoubleUtil.LessThan(remainingLength, 0)) + if (remainingLength < 0) { remainingLength = 0; break; @@ -380,7 +380,7 @@ protected override Size MeasureOverride(Size constraint) bandThickness = Math.Max(bandThickness, fHorizontal ? toolBar.DesiredSize.Height : toolBar.DesiredSize.Width); bandLength += fHorizontal ? toolBar.DesiredSize.Width : toolBar.DesiredSize.Height; remainingLength -= fHorizontal ? toolBar.DesiredSize.Width : toolBar.DesiredSize.Height; - if (DoubleUtil.LessThan(remainingLength, 0)) + if (remainingLength < 0) { remainingLength = 0; }