src\Framework\System\Windows\Controls\Border.cs (12)
241Size childConstraint = new Size(Math.Max(0.0, constraint.Width - combined.Width),
242Math.Max(0.0, constraint.Height - combined.Height));
648Math.Max(0.0, rt.Width - thick.Left - thick.Right),
649Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
992LeftTop = Math.Max(0.0, radii.TopLeft - left);
993TopLeft = Math.Max(0.0, radii.TopLeft - top);
994TopRight = Math.Max(0.0, radii.TopRight - top);
995RightTop = Math.Max(0.0, radii.TopRight - right);
996RightBottom = Math.Max(0.0, radii.BottomRight - right);
997BottomRight = Math.Max(0.0, radii.BottomRight - bottom);
998BottomLeft = Math.Max(0.0, radii.BottomLeft - bottom);
999LeftBottom = Math.Max(0.0, radii.BottomLeft - left);
src\Framework\System\Windows\Controls\DataGridColumnCollection.cs (11)
953availableStarSpace = Math.Max(0.0, availableStarSpace - columnMinWidth);
1237double displayValue = Math.Max(width.DesiredValue, minWidth);
1391Math.Max(width.DisplayValue - nonRetrievableSpace, changedColumn.MinWidth)));
1463return Math.Max(availableSpace - requiredSpace, 0.0);
1674column.UpdateWidthForStarColumn(Math.Max(columnDesiredWidth, column.MinWidth), columnDesiredWidth, columnDesiredWidth / perStarWidth);
1703double columnExcessWidth = onlyShrinkToDesiredWidth ? width.DisplayValue - Math.Max(width.DesiredValue, column.MinWidth) : width.DisplayValue - column.MinWidth;
2011giveAwayWidth = Math.Max(usedStarSpace - expectedStarSpace, 0.0);
2147giveAwayWidth = Math.Min(giveAwayWidth, Math.Max(0d, totalSpace - usedSpace));
2202takeAwayWidth = Math.Max(0.0, takeAwayWidth - unusedSpace);
2273double usedStarSpace = ComputeStarColumnWidths(Math.Max(expectedStarSpace, sumOfStarMinWidths));
2274takeAwayWidth = Math.Max(usedStarSpace - expectedStarSpace, 0.0);
src\Framework\System\Windows\Controls\DockPanel.cs (10)
232childConstraint = new Size(Math.Max(0.0, constraint.Width - accumulatedWidth),
233Math.Max(0.0, constraint.Height - accumulatedHeight));
253parentHeight = Math.Max(parentHeight, accumulatedHeight + childDesiredSize.Height);
259parentWidth = Math.Max(parentWidth, accumulatedWidth + childDesiredSize.Width);
266parentWidth = Math.Max(parentWidth, accumulatedWidth);
267parentHeight = Math.Max(parentHeight, accumulatedHeight);
297Math.Max(0.0, arrangeSize.Width - (accumulatedLeft + accumulatedRight)),
298Math.Max(0.0, arrangeSize.Height - (accumulatedTop + accumulatedBottom)) );
311rcChild.X = Math.Max(0.0, arrangeSize.Width - accumulatedRight);
322rcChild.Y = Math.Max(0.0, arrangeSize.Height - accumulatedBottom);
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (6)
593Math.Max(ia.OriginWidth, pagePadding.Left),
594Math.Max(ia.OriginHeight, pagePadding.Top),
595Math.Max(ia.MediaSizeWidth - (ia.OriginWidth + ia.ExtentWidth), pagePadding.Right),
596Math.Max(ia.MediaSizeHeight - (ia.OriginHeight + ia.ExtentHeight), pagePadding.Bottom));
647Zoom = Math.Max(Zoom - ZoomIncrement, MinZoom);
722SetCurrentValueInternal(ZoomProperty, Math.Max(Zoom - ZoomIncrement, MinZoom));
src\Framework\System\Windows\Controls\Grid.cs (27)
442gridDesiredSize.Width = Math.Max(gridDesiredSize.Width, child.DesiredSize.Width);
443gridDesiredSize.Height = Math.Max(gridDesiredSize.Height, child.DesiredSize.Height);
1169userMinSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize));
1193definitions[i].MeasureSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize));
1532double maxSize = Math.Max(definitions[i].UserMaxSize, minSize);
1740double maxSize = Math.Max(definitions[i].MinSize, definitions[i].UserMaxSize);
1779double userSize = Math.Max(availableSize - takenSize, 0.0) * (starValue / tempDefinitions[i].SizeCache);
1781resolvedSize = Math.Max(tempDefinitions[i].MinSize, resolvedSize);
1893double effectiveMaxSize = Math.Max(def.MinSize, def.UserMaxSize);
1965resolvedSize = Math.Max(resolvedDef.MinSize, resolvedDef.UserMaxSize);
2083double resolvedSize = (def.MeasureSize > 0.0) ? Math.Max(availableSize - takenSize, 0.0) * (def.MeasureSize / def.SizeCache) : 0.0;
2087resolvedSize = Math.Max(def.MinSize, resolvedSize);
2180double maxSize = Math.Max(definitions[i].MinSizeForArrange, definitions[i].UserMaxSize);
2221definitions[i].SizeCache = Math.Max(definitions[i].MinSizeForArrange, Math.Min(userSize, userMaxSize));
2267double userSize = Math.Max(finalSize - allPreferredArrangeSize, 0.0) * (starValue / definitions[definitionIndices[i]].SizeCache);
2269resolvedSize = Math.Max(definitions[definitionIndices[i]].MinSizeForArrange, resolvedSize);
2295final = Math.Max(final, definitions[definitionIndex].MinSizeForArrange);
2302final = Math.Max(final, definitions[definitionIndex].MinSizeForArrange);
2337final = Math.Max(final, definition.MinSizeForArrange);
2353final = Math.Max(final, definition.MinSizeForArrange);
2471double effectiveMaxSize = Math.Max(def.MinSizeForArrange, def.UserMaxSize);
2510def.SizeCache = Math.Max(def.MinSizeForArrange, Math.Min(userSize, userMaxSize));
2581resolvedSize = Math.Max(resolvedDef.MinSizeForArrange, resolvedDef.UserMaxSize);
2700double resolvedSize = (def.MeasureSize > 0.0) ? Math.Max(finalSize - takenSize, 0.0) * (def.MeasureSize / def.SizeCache) : 0.0;
2704resolvedSize = Math.Max(def.MinSizeForArrange, resolvedSize);
2797final = Math.Max(final, definition.MinSizeForArrange);
2813final = Math.Max(final, definition.MinSizeForArrange);
src\Framework\System\Windows\Controls\Slider.cs (8)
1023valueToSize = Math.Max(0.0, (trackSize.Width - thumbSize.Width) / range);
1029Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(Maximum - SelectionEnd, 0) * valueToSize);
1033Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize);
1045valueToSize = Math.Max(0.0, (trackSize.Height - thumbSize.Height) / range);
1051Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize);
1055Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(Maximum - SelectionEnd,0) * valueToSize);
1161double next = SnapToTick(Math.Max(this.Minimum, Math.Min(this.Maximum, value + direction)));
1357this.SetCurrentValueInternal(ValueProperty, Math.Max(this.Minimum, Math.Min(this.Maximum, snappedValue)));
src\Framework\System\Windows\Controls\Stack.cs (8)
610stackDesiredSize.Height = Math.Max(stackDesiredSize.Height, childDesiredSize.Height);
615stackDesiredSize.Width = Math.Max(stackDesiredSize.Width, childDesiredSize.Width);
675offset.Y = Math.Max(0, Math.Min(offset.Y, extent.Height - viewport.Height));
683offset.X = Math.Max(0, Math.Min(offset.X, extent.Width - viewport.Width));
767rcChild.Height = Math.Max(arrangeSize.Height, child.DesiredSize.Height);
774rcChild.Width = Math.Max(arrangeSize.Width, child.DesiredSize.Width);
908double left = Math.Max(targetRectOffset, minPhysicalOffset);
909targetRectSize = Math.Max(Math.Min(targetRectSize + targetRectOffset, minPhysicalOffset + viewportSize) - left, 0);
src\Framework\System\Windows\Controls\TextBlock.cs (10)
1353Size contentSize = new Size(Math.Max(0.0, constraint.Width - (padding.Left + padding.Right)),
1354Math.Max(0.0, constraint.Height - (padding.Top + padding.Bottom)));
1393desiredSize.Width = Math.Max(desiredSize.Width, line.GetCollapsedWidth());
1622double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom);
2067Size contentSize = new Size(Math.Max(0.0, _referenceSize.Width - (padding.Left + padding.Right)),
2068Math.Max(0.0, _referenceSize.Height - (padding.Top + padding.Bottom)));
3206Size contentSize = new Size(Math.Max(0.0, computedSize.Width - (padding.Left + padding.Right)),
3207Math.Max(0.0, computedSize.Height - (padding.Top + padding.Bottom)));
3256double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom);
3286width = Math.Max(0.0, width - paddingWidth);
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (104)
2580double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0);
3328arrangeLength = Math.Max(isHorizontal ? arrangeSize.Height : arrangeSize.Width, arrangeLength);
4670pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X));
4674logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X));
4706extendedViewport.Width = Math.Max(extendedViewport.Width + extendedViewport.X, 0.0);
4741extendedViewport.Width = Math.Max(extendedViewport.Width / approxSizeOfLogicalUnit + extendedViewport.X, 0.0) * approxSizeOfLogicalUnit;
4776pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y));
4780logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y));
4812extendedViewport.Height = Math.Max(extendedViewport.Height + extendedViewport.Y, 0.0);
4847extendedViewport.Height = Math.Max(extendedViewport.Height / approxSizeOfLogicalUnit + extendedViewport.Y, 0.0) * approxSizeOfLogicalUnit;
4865double factor = Math.Max(1.0, isHorizontal ? extendedViewport.Width / viewport.Width : extendedViewport.Height / viewport.Height);
4978viewport.Width = Math.Max(viewport.Width - sizeAfterStartViewportEdge, 0);
4982cacheBeforeSize = Math.Max(cacheBeforeSize - sizeBeforeStartViewportEdge, 0);
4986cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Width * sizeBeforeStartViewportEdge / pixelSize.Width), 0);
5013viewport.Width = Math.Max(0, parentViewport.Width - pixelSize.Width);
5028cacheAfterSize = Math.Max(cacheAfterSize - sizeAfterEndViewportEdge, 0);
5032cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Width * sizeAfterEndViewportEdge / pixelSize.Width), 0);
5044cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Width, 0);
5048cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Width, 0);
5077viewport.Height = Math.Max(viewport.Height - sizeAfterStartViewportEdge, 0);
5081cacheBeforeSize = Math.Max(cacheBeforeSize - sizeBeforeStartViewportEdge, 0);
5085cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Height * sizeBeforeStartViewportEdge / pixelSize.Height), 0);
5112viewport.Height = Math.Max(0, parentViewport.Height - pixelSize.Height);
5127cacheAfterSize = Math.Max(cacheAfterSize - sizeAfterEndViewportEdge, 0);
5131cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Height * sizeAfterEndViewportEdge / pixelSize.Height), 0);
5143cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Height, 0);
5147cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Height, 0);
5212cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.X);
5217viewport.Width = Math.Max(0, viewport.Width + viewport.X);
5237cacheBeforeSize = Math.Max(0, cacheBeforeSize - inset.Right);
5241cacheBeforeSize = Math.Max(0, cacheBeforeSize - 1);
5256viewport.Width = Math.Max(0, viewport.Width - inset.Left);
5267cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Left - viewport.Width));
5284cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Left);
5288cacheAfterSize = Math.Max(0, cacheAfterSize - 1);
5315cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.Y);
5320viewport.Height = Math.Max(0, viewport.Height + viewport.Y);
5340cacheBeforeSize = Math.Max(0, cacheBeforeSize - inset.Bottom);
5344cacheBeforeSize = Math.Max(0, cacheBeforeSize - 1);
5359viewport.Height = Math.Max(0, viewport.Height - inset.Top);
5370cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Top - viewport.Height));
5387cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Top);
5391cacheAfterSize = Math.Max(0, cacheAfterSize - 1);
5447double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0);
6598childViewport.Width = Math.Max(childViewport.Width - stackPixelSizeInViewport.Width, 0.0);
6603childViewport.Width = Math.Max(childViewport.Width - stackPixelSizeInViewport.Width, 0.0);
6611Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Width, 0.0),
6614Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Width, 0.0));
6622Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Width, 0.0),
6625Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Width, 0.0));
6644childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0);
6649childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0);
6657Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Height, 0.0),
6660Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Height, 0.0));
6668Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Height, 0.0),
6671Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Height, 0.0));
6774childLogicalSize.Width = Math.Max(itemDesiredSizes.LogicalSize.Width, logicalHeaderSize.Width);
6779childLogicalSize.Height = Math.Max(itemDesiredSizes.LogicalSize.Height, logicalHeaderSize.Height);
6978Size frontPixelSize = isHorizontal ? new Size(Math.Max(inset.Left,0), childDesiredSize.Height)
6979: new Size(childDesiredSize.Width, Math.Max(inset.Top, 0));
6992Size backPixelSize = isHorizontal ? new Size(Math.Max(inset.Right,0), childDesiredSize.Height)
6993: new Size(childDesiredSize.Width, Math.Max(inset.Bottom,0));
7006adjustedChildViewport.Width = Math.Max(0, adjustedChildViewport.Width - childPixelSizeInViewport.Width);
7012adjustedChildViewport.Height = Math.Max(0, adjustedChildViewport.Height - childPixelSizeInViewport.Height);
7097pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.X, childPixelSize.Width) ? Math.Max(childViewport.X, 0.0) : childPixelSize.Width;
7099pixelSizeAfterViewport = Math.Max(childPixelSize.Width - pixelSizeInViewport - pixelSizeBeforeViewport, 0.0); // Please note that due to rounding errors this subtraction can lead to negative values. Hence the Math.Max call
7153double childPixelHeightInViewport = Math.Min(childViewport.Height, childPixelSize.Height - Math.Max(childViewport.Y, 0.0));
7156childPixelSizeInViewport.Height = Math.Max(childPixelSizeInViewport.Height, childPixelHeightInViewport);
7158childPixelSizeInCacheBeforeViewport.Height = Math.Max(childPixelSizeInCacheBeforeViewport.Height, childPixelHeightInViewport);
7160childPixelSizeInCacheAfterViewport.Height = Math.Max(childPixelSizeInCacheAfterViewport.Height, childPixelHeightInViewport);
7163childLogicalSizeInViewport.Height = Math.Max(childLogicalSizeInViewport.Height, childLogicalSize.Height);
7165childLogicalSizeInCacheBeforeViewport.Height = Math.Max(childLogicalSizeInCacheBeforeViewport.Height, childLogicalSize.Height);
7167childLogicalSizeInCacheAfterViewport.Height = Math.Max(childLogicalSizeInCacheAfterViewport.Height, childLogicalSize.Height);
7189pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.Y, childPixelSize.Height) ? Math.Max(childViewport.Y, 0.0) : childPixelSize.Height;
7191pixelSizeAfterViewport = Math.Max(childPixelSize.Height - pixelSizeInViewport - pixelSizeBeforeViewport, 0.0); // Please note that due to rounding errors this subtraction can lead to negative values. Hence the Math.Max call
7245double childPixelWidthInViewport = Math.Min(childViewport.Width, childPixelSize.Width - Math.Max(childViewport.X, 0.0));
7248childPixelSizeInViewport.Width = Math.Max(childPixelSizeInViewport.Width, childPixelWidthInViewport);
7250childPixelSizeInCacheBeforeViewport.Width = Math.Max(childPixelSizeInCacheBeforeViewport.Width, childPixelWidthInViewport);
7252childPixelSizeInCacheAfterViewport.Width = Math.Max(childPixelSizeInCacheAfterViewport.Width, childPixelWidthInViewport);
7255childLogicalSizeInViewport.Width = Math.Max(childLogicalSizeInViewport.Width, childLogicalSize.Width);
7257childLogicalSizeInCacheBeforeViewport.Width = Math.Max(childLogicalSizeInCacheBeforeViewport.Width, childLogicalSize.Width);
7259childLogicalSizeInCacheAfterViewport.Width = Math.Max(childLogicalSizeInCacheAfterViewport.Width, childLogicalSize.Width);
7302sz1.Height = Math.Max(sz1.Height, sz2.Height);
7307sz1.Width = Math.Max(sz1.Width, sz2.Width);
7357childSize = new Size(Math.Max(headerDesiredSizes.PixelSize.Width, itemDesiredSizes.PixelSize.Width),
7362childSize = new Size(Math.Max(headerDesiredSizes.LogicalSize.Width, itemDesiredSizes.LogicalSize.Width),
7530Math.Max(1, itemDesiredSizes.LogicalSize.Height))
7531: new Size(Math.Max(1, itemDesiredSizes.LogicalSize.Width),
8327rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8352previousChildSize.Width = Math.Max(previousChildSize.Width, pixelHeaderSize.Width);
8359rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
8384previousChildSize.Height = Math.Max(previousChildSize.Height, pixelHeaderSize.Height);
8414rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8420rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
8458rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8511rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
9520_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
9547_scrollData._maxDesiredSize.Width = Math.Max(_scrollData._maxDesiredSize.Width, stackPixelSize.Width);
10372_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
10399_scrollData._maxDesiredSize.Width = Math.Max(_scrollData._maxDesiredSize.Width, stackPixelSize.Width);
11053double left = Math.Max(targetRectOffset, minPhysicalOffset);
11054targetRectSize = Math.Max(Math.Min(targetRectSize + targetRectOffset, minPhysicalOffset + viewportSize) - left, 0);
11147maxChildLength = Math.Max(maxChildLength, childSize.Height);
11151maxChildLength = Math.Max(maxChildLength, childSize.Width);
src\Framework\System\Windows\FrameworkElement.cs (28)
4065maxHeight = Math.Max(Math.Min(height, maxHeight), minHeight);
4068minHeight = Math.Max(Math.Min(maxHeight, height), minHeight);
4075maxWidth = Math.Max(Math.Min(width, maxWidth), minWidth);
4078minWidth = Math.Max(Math.Min(maxWidth, width), minWidth);
4343Math.Max(availableSize.Width - marginWidth, 0),
4344Math.Max(availableSize.Height - marginHeight, 0));
4392frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth));
4393frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
4406Math.Max(desiredSize.Width, mm.minWidth),
4407Math.Max(desiredSize.Height, mm.minHeight));
4473ltd.TransformedUnroundedDS = new Size(Math.Max(0, clippedDesiredWidth), Math.Max(0, clippedDesiredHeight));
4520return new Size(Math.Max(0, clippedDesiredWidth), Math.Max(0, clippedDesiredHeight));
4582arrangeSize.Width = Math.Max(0, arrangeSize.Width - marginWidth);
4583arrangeSize.Height = Math.Max(0, arrangeSize.Height - marginHeight);
4591transformedUnroundedDS.Width = Math.Max(0, transformedUnroundedDS.Width - marginWidth);
4592transformedUnroundedDS.Height = Math.Max(0, transformedUnroundedDS.Height- marginHeight);
4601unclippedDesiredSize = new Size(Math.Max(0, this.DesiredSize.Width - marginWidth),
4602Math.Max(0, this.DesiredSize.Height - marginHeight));
4607unclippedDesiredSize.Width = Math.Max(transformedUnroundedDS.Width, unclippedDesiredSize.Width);
4608unclippedDesiredSize.Height = Math.Max(transformedUnroundedDS.Height, unclippedDesiredSize.Height);
4695double effectiveMaxWidth = Math.Max(unclippedDesiredSize.Width, mm.maxWidth);
4702double effectiveMaxHeight = Math.Max(unclippedDesiredSize.Height, mm.maxHeight);
4766Size clientSize = new Size(Math.Max(0, finalRect.Width - marginWidth),
4767Math.Max(0, finalRect.Height - marginHeight));
4934Size clippingSize = new Size(Math.Max(0, layoutSlotSize.Width - marginWidth),
4935Math.Max(0, layoutSlotSize.Height - marginHeight));
src\Framework\System\Windows\Window.cs (18)
1877frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth));
1878frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
1885Math.Max(desiredSize.Width, mm.minWidth),
1886Math.Max(desiredSize.Height, mm.minHeight));
1907arrangeBounds.Width = Math.Max(mm.minWidth, Math.Min(arrangeBounds.Width, mm.maxWidth));
1908arrangeBounds.Height = Math.Max(mm.minHeight, Math.Min(arrangeBounds.Height, mm.maxHeight));
1942childArrangeBounds.Width = Math.Max(0.0, arrangeBounds.Width - frameSize.Width);
1943childArrangeBounds.Height = Math.Max(0.0, arrangeBounds.Height - frameSize.Height);
3494childConstraint.Width = ((constraint.Width == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Width - frameSize.Width)));
3495childConstraint.Height = ((constraint.Height == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Height - frameSize.Height)));
3539maxWidthDeviceUnits = Math.Max(_trackMaxWidthDeviceUnits, _windowMaxWidthDeviceUnits);
3540maxHeightDeviceUnits = Math.Max(_trackMaxHeightDeviceUnits, _windowMaxHeightDeviceUnits);
3549mm.minWidth = Math.Max(this.MinWidth, minSizeLogicalUnits.X);
3571mm.minHeight = Math.Max(this.MinHeight, minSizeLogicalUnits.Y);
4896_windowMaxWidthDeviceUnits = Math.Max(_windowMaxWidthDeviceUnits, windowSize.X);
4897_windowMaxHeightDeviceUnits = Math.Max(_windowMaxHeightDeviceUnits, windowSize.Y);
8135return new Size(Math.Max(0.0, pt.X), Math.Max(0.0, pt.Y));