System\Windows\Controls\Border.cs (12)
234Size childConstraint = new Size(Math.Max(0.0, constraint.Width - combined.Width),
235Math.Max(0.0, constraint.Height - combined.Height));
639Math.Max(0.0, rt.Width - thick.Left - thick.Right),
640Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
983LeftTop = Math.Max(0.0, radii.TopLeft - left);
984TopLeft = Math.Max(0.0, radii.TopLeft - top);
985TopRight = Math.Max(0.0, radii.TopRight - top);
986RightTop = Math.Max(0.0, radii.TopRight - right);
987RightBottom = Math.Max(0.0, radii.BottomRight - right);
988BottomRight = Math.Max(0.0, radii.BottomRight - bottom);
989BottomLeft = Math.Max(0.0, radii.BottomLeft - bottom);
990LeftBottom = Math.Max(0.0, radii.BottomLeft - left);
System\Windows\Controls\DataGridColumnCollection.cs (11)
952availableStarSpace = Math.Max(0.0, availableStarSpace - columnMinWidth);
1236double displayValue = Math.Max(width.DesiredValue, minWidth);
1390Math.Max(width.DisplayValue - nonRetrievableSpace, changedColumn.MinWidth)));
1462return Math.Max(availableSpace - requiredSpace, 0.0);
1673column.UpdateWidthForStarColumn(Math.Max(columnDesiredWidth, column.MinWidth), columnDesiredWidth, columnDesiredWidth / perStarWidth);
1702double columnExcessWidth = onlyShrinkToDesiredWidth ? width.DisplayValue - Math.Max(width.DesiredValue, column.MinWidth) : width.DisplayValue - column.MinWidth;
2010giveAwayWidth = Math.Max(usedStarSpace - expectedStarSpace, 0.0);
2146giveAwayWidth = Math.Min(giveAwayWidth, Math.Max(0d, totalSpace - usedSpace));
2201takeAwayWidth = Math.Max(0.0, takeAwayWidth - unusedSpace);
2272double usedStarSpace = ComputeStarColumnWidths(Math.Max(expectedStarSpace, sumOfStarMinWidths));
2273takeAwayWidth = Math.Max(usedStarSpace - expectedStarSpace, 0.0);
System\Windows\Controls\DockPanel.cs (10)
226childConstraint = new Size(Math.Max(0.0, constraint.Width - accumulatedWidth),
227Math.Max(0.0, constraint.Height - accumulatedHeight));
247parentHeight = Math.Max(parentHeight, accumulatedHeight + childDesiredSize.Height);
253parentWidth = Math.Max(parentWidth, accumulatedWidth + childDesiredSize.Width);
260parentWidth = Math.Max(parentWidth, accumulatedWidth);
261parentHeight = Math.Max(parentHeight, accumulatedHeight);
291Math.Max(0.0, arrangeSize.Width - (accumulatedLeft + accumulatedRight)),
292Math.Max(0.0, arrangeSize.Height - (accumulatedTop + accumulatedBottom)) );
305rcChild.X = Math.Max(0.0, arrangeSize.Width - accumulatedRight);
316rcChild.Y = Math.Max(0.0, arrangeSize.Height - accumulatedBottom);
System\Windows\Controls\FlowDocumentScrollViewer.cs (6)
592Math.Max(ia.OriginWidth, pagePadding.Left),
593Math.Max(ia.OriginHeight, pagePadding.Top),
594Math.Max(ia.MediaSizeWidth - (ia.OriginWidth + ia.ExtentWidth), pagePadding.Right),
595Math.Max(ia.MediaSizeHeight - (ia.OriginHeight + ia.ExtentHeight), pagePadding.Bottom));
646Zoom = Math.Max(Zoom - ZoomIncrement, MinZoom);
716SetCurrentValueInternal(ZoomProperty, Math.Max(Zoom - ZoomIncrement, MinZoom));
System\Windows\Controls\Grid.cs (27)
380gridDesiredSize.Width = Math.Max(gridDesiredSize.Width, child.DesiredSize.Width);
381gridDesiredSize.Height = Math.Max(gridDesiredSize.Height, child.DesiredSize.Height);
1106userMinSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize));
1130definitions[i].MeasureSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize));
1468double maxSize = Math.Max(definitions[i].UserMaxSize, minSize);
1676double maxSize = Math.Max(definitions[i].MinSize, definitions[i].UserMaxSize);
1715double userSize = Math.Max(availableSize - takenSize, 0.0) * (starValue / tempDefinitions[i].SizeCache);
1717resolvedSize = Math.Max(tempDefinitions[i].MinSize, resolvedSize);
1829double effectiveMaxSize = Math.Max(def.MinSize, def.UserMaxSize);
1901resolvedSize = Math.Max(resolvedDef.MinSize, resolvedDef.UserMaxSize);
2019double resolvedSize = (def.MeasureSize > 0.0) ? Math.Max(availableSize - takenSize, 0.0) * (def.MeasureSize / def.SizeCache) : 0.0;
2023resolvedSize = Math.Max(def.MinSize, resolvedSize);
2116double maxSize = Math.Max(definitions[i].MinSizeForArrange, definitions[i].UserMaxSize);
2157definitions[i].SizeCache = Math.Max(definitions[i].MinSizeForArrange, Math.Min(userSize, userMaxSize));
2202double userSize = Math.Max(finalSize - allPreferredArrangeSize, 0.0) * (starValue / definitions[definitionIndices[i]].SizeCache);
2204resolvedSize = Math.Max(definitions[definitionIndices[i]].MinSizeForArrange, resolvedSize);
2229final = Math.Max(final, definitions[definitionIndex].MinSizeForArrange);
2236final = Math.Max(final, definitions[definitionIndex].MinSizeForArrange);
2270final = Math.Max(final, definition.MinSizeForArrange);
2286final = Math.Max(final, definition.MinSizeForArrange);
2404double effectiveMaxSize = Math.Max(def.MinSizeForArrange, def.UserMaxSize);
2443def.SizeCache = Math.Max(def.MinSizeForArrange, Math.Min(userSize, userMaxSize));
2512resolvedSize = Math.Max(resolvedDef.MinSizeForArrange, resolvedDef.UserMaxSize);
2644double resolvedSize = (def.MeasureSize > 0.0) ? Math.Max(finalSize - takenSize, 0.0) * (def.MeasureSize / def.SizeCache) : 0.0;
2648resolvedSize = Math.Max(def.MinSizeForArrange, resolvedSize);
2739final = Math.Max(final, definition.MinSizeForArrange);
2755final = Math.Max(final, definition.MinSizeForArrange);
System\Windows\Controls\Slider.cs (10)
1018valueToSize = Math.Max(0.0, (trackSize.Width - thumbSize.Width) / range);
1024Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(Maximum - SelectionEnd, 0) * valueToSize);
1028Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize);
1040valueToSize = Math.Max(0.0, (trackSize.Height - thumbSize.Height) / range);
1046Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize);
1050Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(Maximum - SelectionEnd,0) * valueToSize);
1083valueToSize = Math.Max(0.0, (trackSize.Width - thumbSize.Width) / range);
1107valueToSize = Math.Max(0.0, (trackSize.Height - thumbSize.Height) / range);
1236double next = SnapToTick(Math.Max(this.Minimum, Math.Min(this.Maximum, value + direction)));
1435this.SetCurrentValueInternal(ValueProperty, Math.Max(this.Minimum, Math.Min(this.Maximum, snappedValue)));
System\Windows\Controls\Stack.cs (8)
604stackDesiredSize.Height = Math.Max(stackDesiredSize.Height, childDesiredSize.Height);
609stackDesiredSize.Width = Math.Max(stackDesiredSize.Width, childDesiredSize.Width);
669offset.Y = Math.Max(0, Math.Min(offset.Y, extent.Height - viewport.Height));
677offset.X = Math.Max(0, Math.Min(offset.X, extent.Width - viewport.Width));
761rcChild.Height = Math.Max(arrangeSize.Height, child.DesiredSize.Height);
768rcChild.Width = Math.Max(arrangeSize.Width, child.DesiredSize.Width);
902double left = Math.Max(targetRectOffset, minPhysicalOffset);
903targetRectSize = Math.Max(Math.Min(targetRectSize + targetRectOffset, minPhysicalOffset + viewportSize) - left, 0);
System\Windows\Controls\TextBlock.cs (10)
1275Size contentSize = new Size(Math.Max(0.0, constraint.Width - (padding.Left + padding.Right)),
1276Math.Max(0.0, constraint.Height - (padding.Top + padding.Bottom)));
1315desiredSize.Width = Math.Max(desiredSize.Width, line.GetCollapsedWidth());
1541double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom);
1978Size contentSize = new Size(Math.Max(0.0, _referenceSize.Width - (padding.Left + padding.Right)),
1979Math.Max(0.0, _referenceSize.Height - (padding.Top + padding.Bottom)));
3116Size contentSize = new Size(Math.Max(0.0, computedSize.Width - (padding.Left + padding.Right)),
3117Math.Max(0.0, computedSize.Height - (padding.Top + padding.Bottom)));
3166double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom);
3196width = Math.Max(0.0, width - paddingWidth);
System\Windows\Controls\VirtualizingStackPanel.cs (109)
2632double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0);
3389arrangeLength = Math.Max(isHorizontal ? arrangeSize.Height : arrangeSize.Width, arrangeLength);
4767pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X));
4771logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X));
4803extendedViewport.Width = Math.Max(extendedViewport.Width + extendedViewport.X, 0.0);
4814extendedViewport.Width = Math.Max(_scrollData._extent.Width - extendedViewport.X, 0.0);
4843extendedViewport.Width = Math.Max(extendedViewport.Width / approxSizeOfLogicalUnit + extendedViewport.X, 0.0) * approxSizeOfLogicalUnit;
4854extendedViewport.Width = Math.Max(_scrollData._extent.Width - extendedViewport.X, 0.0) * approxSizeOfLogicalUnit;
4883pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y));
4887logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y));
4919extendedViewport.Height = Math.Max(extendedViewport.Height + extendedViewport.Y, 0.0);
4930extendedViewport.Height = Math.Max(_scrollData._extent.Height - extendedViewport.Y, 0.0);
4959extendedViewport.Height = Math.Max(extendedViewport.Height / approxSizeOfLogicalUnit + extendedViewport.Y, 0.0) * approxSizeOfLogicalUnit;
4970extendedViewport.Height = Math.Max(_scrollData._extent.Height - extendedViewport.Y, 0.0) * approxSizeOfLogicalUnit;
4982double factor = Math.Max(1.0, isHorizontal ? extendedViewport.Width / viewport.Width : extendedViewport.Height / viewport.Height);
5095viewport.Width = Math.Max(viewport.Width - sizeAfterStartViewportEdge, 0);
5099cacheBeforeSize = Math.Max(cacheBeforeSize - sizeBeforeStartViewportEdge, 0);
5103cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Width * sizeBeforeStartViewportEdge / pixelSize.Width), 0);
5130viewport.Width = Math.Max(0, parentViewport.Width - pixelSize.Width);
5145cacheAfterSize = Math.Max(cacheAfterSize - sizeAfterEndViewportEdge, 0);
5149cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Width * sizeAfterEndViewportEdge / pixelSize.Width), 0);
5161cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Width, 0);
5165cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Width, 0);
5194viewport.Height = Math.Max(viewport.Height - sizeAfterStartViewportEdge, 0);
5198cacheBeforeSize = Math.Max(cacheBeforeSize - sizeBeforeStartViewportEdge, 0);
5202cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Height * sizeBeforeStartViewportEdge / pixelSize.Height), 0);
5229viewport.Height = Math.Max(0, parentViewport.Height - pixelSize.Height);
5244cacheAfterSize = Math.Max(cacheAfterSize - sizeAfterEndViewportEdge, 0);
5248cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Height * sizeAfterEndViewportEdge / pixelSize.Height), 0);
5260cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Height, 0);
5264cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Height, 0);
5329cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.X);
5334viewport.Width = Math.Max(0, viewport.Width + viewport.X);
5354cacheBeforeSize = Math.Max(0, cacheBeforeSize - inset.Right);
5358cacheBeforeSize = Math.Max(0, cacheBeforeSize - 1);
5373viewport.Width = Math.Max(0, viewport.Width - inset.Left);
5384cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Left - viewport.Width));
5401cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Left);
5405cacheAfterSize = Math.Max(0, cacheAfterSize - 1);
5432cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.Y);
5437viewport.Height = Math.Max(0, viewport.Height + viewport.Y);
5457cacheBeforeSize = Math.Max(0, cacheBeforeSize - inset.Bottom);
5461cacheBeforeSize = Math.Max(0, cacheBeforeSize - 1);
5476viewport.Height = Math.Max(0, viewport.Height - inset.Top);
5487cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Top - viewport.Height));
5504cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Top);
5508cacheAfterSize = Math.Max(0, cacheAfterSize - 1);
5564double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0);
6736childViewport.Width = Math.Max(childViewport.Width - stackPixelSizeInViewport.Width, 0.0);
6741childViewport.Width = Math.Max(childViewport.Width - stackPixelSizeInViewport.Width, 0.0);
6749Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Width, 0.0),
6752Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Width, 0.0));
6760Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Width, 0.0),
6763Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Width, 0.0));
6782childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0);
6787childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0);
6795Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Height, 0.0),
6798Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Height, 0.0));
6806Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Height, 0.0),
6809Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Height, 0.0));
6914childLogicalSize.Width = Math.Max(itemDesiredSizes.LogicalSize.Width, logicalHeaderSize.Width);
6919childLogicalSize.Height = Math.Max(itemDesiredSizes.LogicalSize.Height, logicalHeaderSize.Height);
7118Size frontPixelSize = isHorizontal ? new Size(Math.Max(inset.Left,0), childDesiredSize.Height)
7119: new Size(childDesiredSize.Width, Math.Max(inset.Top, 0));
7132Size backPixelSize = isHorizontal ? new Size(Math.Max(inset.Right,0), childDesiredSize.Height)
7133: new Size(childDesiredSize.Width, Math.Max(inset.Bottom,0));
7146adjustedChildViewport.Width = Math.Max(0, adjustedChildViewport.Width - childPixelSizeInViewport.Width);
7152adjustedChildViewport.Height = Math.Max(0, adjustedChildViewport.Height - childPixelSizeInViewport.Height);
7237pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.X, childPixelSize.Width) ? Math.Max(childViewport.X, 0.0) : childPixelSize.Width;
7239pixelSizeAfterViewport = 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
7293double childPixelHeightInViewport = Math.Min(childViewport.Height, childPixelSize.Height - Math.Max(childViewport.Y, 0.0));
7296childPixelSizeInViewport.Height = Math.Max(childPixelSizeInViewport.Height, childPixelHeightInViewport);
7298childPixelSizeInCacheBeforeViewport.Height = Math.Max(childPixelSizeInCacheBeforeViewport.Height, childPixelHeightInViewport);
7300childPixelSizeInCacheAfterViewport.Height = Math.Max(childPixelSizeInCacheAfterViewport.Height, childPixelHeightInViewport);
7303childLogicalSizeInViewport.Height = Math.Max(childLogicalSizeInViewport.Height, childLogicalSize.Height);
7305childLogicalSizeInCacheBeforeViewport.Height = Math.Max(childLogicalSizeInCacheBeforeViewport.Height, childLogicalSize.Height);
7307childLogicalSizeInCacheAfterViewport.Height = Math.Max(childLogicalSizeInCacheAfterViewport.Height, childLogicalSize.Height);
7329pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.Y, childPixelSize.Height) ? Math.Max(childViewport.Y, 0.0) : childPixelSize.Height;
7331pixelSizeAfterViewport = 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
7385double childPixelWidthInViewport = Math.Min(childViewport.Width, childPixelSize.Width - Math.Max(childViewport.X, 0.0));
7388childPixelSizeInViewport.Width = Math.Max(childPixelSizeInViewport.Width, childPixelWidthInViewport);
7390childPixelSizeInCacheBeforeViewport.Width = Math.Max(childPixelSizeInCacheBeforeViewport.Width, childPixelWidthInViewport);
7392childPixelSizeInCacheAfterViewport.Width = Math.Max(childPixelSizeInCacheAfterViewport.Width, childPixelWidthInViewport);
7395childLogicalSizeInViewport.Width = Math.Max(childLogicalSizeInViewport.Width, childLogicalSize.Width);
7397childLogicalSizeInCacheBeforeViewport.Width = Math.Max(childLogicalSizeInCacheBeforeViewport.Width, childLogicalSize.Width);
7399childLogicalSizeInCacheAfterViewport.Width = Math.Max(childLogicalSizeInCacheAfterViewport.Width, childLogicalSize.Width);
7442sz1.Height = Math.Max(sz1.Height, sz2.Height);
7447sz1.Width = Math.Max(sz1.Width, sz2.Width);
7497childSize = new Size(Math.Max(headerDesiredSizes.PixelSize.Width, itemDesiredSizes.PixelSize.Width),
7502childSize = new Size(Math.Max(headerDesiredSizes.LogicalSize.Width, itemDesiredSizes.LogicalSize.Width),
7670Math.Max(1, itemDesiredSizes.LogicalSize.Height))
7671: new Size(Math.Max(1, itemDesiredSizes.LogicalSize.Width),
7812Math.Max(uniformOrAverageContainerPixelSize, dpiScale), // don't round down to 0
8485rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8510previousChildSize.Width = Math.Max(previousChildSize.Width, pixelHeaderSize.Width);
8517rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
8542previousChildSize.Height = Math.Max(previousChildSize.Height, pixelHeaderSize.Height);
8572rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8578rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
8616rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8669rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
9670_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
9697_scrollData._maxDesiredSize.Width = Math.Max(_scrollData._maxDesiredSize.Width, stackPixelSize.Width);
10522_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
10549_scrollData._maxDesiredSize.Width = Math.Max(_scrollData._maxDesiredSize.Width, stackPixelSize.Width);
11193double visibleStart = Math.Max(start, 0);
11194double visibleEnd = Math.Max(Math.Min(end, viewportSize), visibleStart);
11285maxChildLength = Math.Max(maxChildLength, childSize.Height);
11289maxChildLength = Math.Max(maxChildLength, childSize.Width);
System\Windows\FrameworkElement.cs (28)
4059maxHeight = Math.Max(Math.Min(height, maxHeight), minHeight);
4062minHeight = Math.Max(Math.Min(maxHeight, height), minHeight);
4069maxWidth = Math.Max(Math.Min(width, maxWidth), minWidth);
4072minWidth = Math.Max(Math.Min(maxWidth, width), minWidth);
4340Math.Max(availableSize.Width - marginWidth, 0),
4341Math.Max(availableSize.Height - marginHeight, 0));
4389frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth));
4390frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
4403Math.Max(desiredSize.Width, mm.minWidth),
4404Math.Max(desiredSize.Height, mm.minHeight));
4470ltd.TransformedUnroundedDS = new Size(Math.Max(0, clippedDesiredWidth), Math.Max(0, clippedDesiredHeight));
4517return new Size(Math.Max(0, clippedDesiredWidth), Math.Max(0, clippedDesiredHeight));
4579arrangeSize.Width = Math.Max(0, arrangeSize.Width - marginWidth);
4580arrangeSize.Height = Math.Max(0, arrangeSize.Height - marginHeight);
4589transformedUnroundedDS.Width = Math.Max(0, transformedUnroundedDS.Width - marginWidth);
4590transformedUnroundedDS.Height = Math.Max(0, transformedUnroundedDS.Height- marginHeight);
4599unclippedDesiredSize = new Size(Math.Max(0, this.DesiredSize.Width - marginWidth),
4600Math.Max(0, this.DesiredSize.Height - marginHeight));
4605unclippedDesiredSize.Width = Math.Max(transformedUnroundedDS.Width, unclippedDesiredSize.Width);
4606unclippedDesiredSize.Height = Math.Max(transformedUnroundedDS.Height, unclippedDesiredSize.Height);
4693double effectiveMaxWidth = Math.Max(unclippedDesiredSize.Width, mm.maxWidth);
4700double effectiveMaxHeight = Math.Max(unclippedDesiredSize.Height, mm.maxHeight);
4764Size clientSize = new Size(Math.Max(0, finalRect.Width - marginWidth),
4765Math.Max(0, finalRect.Height - marginHeight));
4932Size clippingSize = new Size(Math.Max(0, layoutSlotSize.Width - marginWidth),
4933Math.Max(0, layoutSlotSize.Height - marginHeight));
System\Windows\Window.cs (18)
1769frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth));
1770frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
1777Math.Max(desiredSize.Width, mm.minWidth),
1778Math.Max(desiredSize.Height, mm.minHeight));
1799arrangeBounds.Width = Math.Max(mm.minWidth, Math.Min(arrangeBounds.Width, mm.maxWidth));
1800arrangeBounds.Height = Math.Max(mm.minHeight, Math.Min(arrangeBounds.Height, mm.maxHeight));
1834childArrangeBounds.Width = Math.Max(0.0, arrangeBounds.Width - frameSize.Width);
1835childArrangeBounds.Height = Math.Max(0.0, arrangeBounds.Height - frameSize.Height);
3311childConstraint.Width = ((constraint.Width == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Width - frameSize.Width)));
3312childConstraint.Height = ((constraint.Height == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Height - frameSize.Height)));
3356maxWidthDeviceUnits = Math.Max(_trackMaxWidthDeviceUnits, _windowMaxWidthDeviceUnits);
3357maxHeightDeviceUnits = Math.Max(_trackMaxHeightDeviceUnits, _windowMaxHeightDeviceUnits);
3366mm.minWidth = Math.Max(this.MinWidth, minSizeLogicalUnits.X);
3388mm.minHeight = Math.Max(this.MinHeight, minSizeLogicalUnits.Y);
4632_windowMaxWidthDeviceUnits = Math.Max(_windowMaxWidthDeviceUnits, windowSize.X);
4633_windowMaxHeightDeviceUnits = Math.Max(_windowMaxHeightDeviceUnits, windowSize.Y);
7523return new Size(Math.Max(0.0, pt.X), Math.Max(0.0, pt.Y));