849 references to Max
Aspire.Dashboard (1)
Metrics (8)
Metrics.Legacy (8)
Microsoft.AspNetCore.Routing (1)
Microsoft.Build (2)
Microsoft.CodeAnalysis.Analyzers (8)
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
Microsoft.CodeAnalysis.BannedApiAnalyzers (8)
Microsoft.CodeAnalysis.EditorFeatures (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (8)
Microsoft.Data.Analysis (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Maui (19)
Microsoft.Maui.Controls (69)
LegacyLayouts\GridCalc.cs (23)
201 actualHeight = Math.Max(actualHeight, sizeRequest.Request.Height - assignedHeight - grid.RowSpacing * (GetRowSpan(child) - 1));
202 minimumHeight = Math.Max(minimumHeight, sizeRequest.Minimum.Height - assignedHeight - grid.RowSpacing * (GetRowSpan(child) - 1));
234 actualWidth = Math.Max(actualWidth, sizeRequest.Request.Width - assignedWidth - (GetColumnSpan(child) - 1) * grid.ColumnSpacing);
235 minimumWidth = Math.Max(minimumWidth, sizeRequest.Minimum.Width - assignedWidth - (GetColumnSpan(child) - 1) * grid.ColumnSpacing);
272 columnwWidthSum += Math.Max(0, c.ActualWidth);
284 rowHeightSum += Math.Max(0, r.ActualHeight);
317 double contractionNeeded = Math.Min(contractionSpace, Math.Max(currentSize.Width - targetWidth, 0));
325 double availableSpace = col.ActualWidth - Math.Max(col.MinimumWidth, 0);
352 double contractionNeeded = Math.Min(contractionSpace, Math.Max(currentSize.Height - targetHeight, 0));
411 double contractionNeeded = Math.Min(contractionSpace, Math.Max(request.Width - targetWidth, 0));
473 double contractionNeeded = Math.Min(contractionSpace, Math.Max(request.Height - targetHeight, 0));
605 starColWidth = Math.Max(starColWidth, GetUnassignedWidth(width, columnSpacing) / totalStarsWidth);
635 starRowHeight = Math.Max(starRowHeight, GetUnassignedHeight(height, rowSpacing) / totalStarsHeight);
677 actualWidth = Math.Max(actualWidth, sizeRequest.Request.Width - assignedWidth - columnSpacing);
678 minimumWidth = Math.Max(minimumWidth, sizeRequest.Minimum.Width - assignedWidth - columnSpacing);
697 starColRequestWidth = Math.Max(starColRequestWidth, col.ActualWidth / col.Width.Value);
698 starColMinWidth = Math.Max(starColMinWidth, col.MinimumWidth / col.Width.Value);
706 return Math.Max(widthConstraint / totalStarsWidth, starColMinWidth);
738 actualHeight = Math.Max(actualHeight, sizeRequest.Request.Height - assignedHeight - rowSpacing);
739 minimumHeight = Math.Max(minimumHeight, sizeRequest.Minimum.Height - assignedHeight - rowSpacing);
758 starRowRequestHeight = Math.Max(starRowRequestHeight, row.ActualHeight / row.Height.Value);
759 starRowMinHeight = Math.Max(starRowMinHeight, row.MinimumHeight / row.Height.Value);
767 return Math.Max(heightConstraint / totalStarsHeight, starRowMinHeight);
Microsoft.Maui.Graphics (4)
Microsoft.Maui.Maps (5)
Primitives\MapSpan.cs (5)
14 LatitudeDegrees = Math.Min(Math.Max(latitudeDegrees, MinimumRangeDegrees), 90.0);
15 LongitudeDegrees = Math.Min(Math.Max(longitudeDegrees, MinimumRangeDegrees), 180.0);
36 north = Math.Min(Math.Max(north, 0), 90);
37 south = Math.Max(Math.Min(south, 0), -90);
38 double lat = Math.Max(Math.Min(Center.Latitude, north), south);
Microsoft.ML.AutoML (6)
Microsoft.ML.AutoML.Tests (1)
Microsoft.ML.Core (1)
Microsoft.ML.Data (3)
Microsoft.ML.FastTree (7)
Microsoft.ML.Mkl.Components (1)
Microsoft.ML.Predictor.Tests (2)
Microsoft.ML.StandardTrainers (1)
Microsoft.ML.Sweeper (3)
Microsoft.ML.TimeSeries (8)
Microsoft.ML.Transforms (1)
PresentationCore (63)
MS\Internal\Ink\StrokeRenderer.cs (7)
106if ((Math.Min(prevArea, currArea) / Math.Max(prevArea, currArea)) <= 0.70d)
248double maxExtent = Math.Max(drawingAttributes.Height, drawingAttributes.Width);
527if ((Math.Min(prevArea, currArea) / Math.Max(prevArea, currArea)) <= 0.90d)
832double intersectLeft = Math.Max(rect1.Left, rect2.Left);
833double intersectTop = Math.Max(rect1.Top, rect2.Top);
834double intersectWidth = Math.Max((double)(Math.Min(rect1.Right, rect2.Right) - intersectLeft), (double)0);
835double intersectHeight = Math.Max((double)(Math.Min(rect1.Bottom, rect2.Bottom) - intersectTop), (double)0);
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (8)
495if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) ||
496(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) ||
497(Math.Max(visEdgeStart.Y, visEdgeEnd.Y) < Math.Min(uv1.Y, uv2.Y)) ||
498(Math.Min(visEdgeStart.Y, visEdgeEnd.Y) > Math.Max(uv1.Y, uv2.Y))))
913if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) ||
914(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) ||
915(Math.Max(visEdgeStart.Y, visEdgeEnd.Y) < Math.Min(uv1.Y, uv2.Y)) ||
916(Math.Min(visEdgeStart.Y, visEdgeEnd.Y) > Math.Max(uv1.Y, uv2.Y))))
PresentationFramework (445)
System\Windows\Controls\Border.cs (12)
229Size childConstraint = new Size(Math.Max(0.0, constraint.Width - combined.Width),
230Math.Max(0.0, constraint.Height - combined.Height));
642Math.Max(0.0, rt.Width - thick.Left - thick.Right),
643Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
986LeftTop = Math.Max(0.0, radii.TopLeft - left);
987TopLeft = Math.Max(0.0, radii.TopLeft - top);
988TopRight = Math.Max(0.0, radii.TopRight - top);
989RightTop = Math.Max(0.0, radii.TopRight - right);
990RightBottom = Math.Max(0.0, radii.BottomRight - right);
991BottomRight = Math.Max(0.0, radii.BottomRight - bottom);
992BottomLeft = Math.Max(0.0, radii.BottomLeft - bottom);
993LeftBottom = Math.Max(0.0, radii.BottomLeft - left);
System\Windows\Controls\DataGridColumnCollection.cs (11)
946availableStarSpace = Math.Max(0.0, availableStarSpace - columnMinWidth);
1227double displayValue = Math.Max(width.DesiredValue, minWidth);
1381Math.Max(width.DisplayValue - nonRetrievableSpace, changedColumn.MinWidth)));
1453return Math.Max(availableSpace - requiredSpace, 0.0);
1664column.UpdateWidthForStarColumn(Math.Max(columnDesiredWidth, column.MinWidth), columnDesiredWidth, columnDesiredWidth / perStarWidth);
1693double columnExcessWidth = onlyShrinkToDesiredWidth ? width.DisplayValue - Math.Max(width.DesiredValue, column.MinWidth) : width.DisplayValue - column.MinWidth;
2001giveAwayWidth = Math.Max(usedStarSpace - expectedStarSpace, 0.0);
2137giveAwayWidth = Math.Min(giveAwayWidth, Math.Max(0d, totalSpace - usedSpace));
2192takeAwayWidth = Math.Max(0.0, takeAwayWidth - unusedSpace);
2263double usedStarSpace = ComputeStarColumnWidths(Math.Max(expectedStarSpace, sumOfStarMinWidths));
2264takeAwayWidth = Math.Max(usedStarSpace - expectedStarSpace, 0.0);
System\Windows\Controls\DockPanel.cs (10)
216childConstraint = new Size(Math.Max(0.0, constraint.Width - accumulatedWidth),
217Math.Max(0.0, constraint.Height - accumulatedHeight));
237parentHeight = Math.Max(parentHeight, accumulatedHeight + childDesiredSize.Height);
243parentWidth = Math.Max(parentWidth, accumulatedWidth + childDesiredSize.Width);
250parentWidth = Math.Max(parentWidth, accumulatedWidth);
251parentHeight = Math.Max(parentHeight, accumulatedHeight);
281Math.Max(0.0, arrangeSize.Width - (accumulatedLeft + accumulatedRight)),
282Math.Max(0.0, arrangeSize.Height - (accumulatedTop + accumulatedBottom)) );
295rcChild.X = Math.Max(0.0, arrangeSize.Width - accumulatedRight);
306rcChild.Y = Math.Max(0.0, arrangeSize.Height - accumulatedBottom);
System\Windows\Controls\FlowDocumentScrollViewer.cs (6)
584Math.Max(ia.OriginWidth, pagePadding.Left),
585Math.Max(ia.OriginHeight, pagePadding.Top),
586Math.Max(ia.MediaSizeWidth - (ia.OriginWidth + ia.ExtentWidth), pagePadding.Right),
587Math.Max(ia.MediaSizeHeight - (ia.OriginHeight + ia.ExtentHeight), pagePadding.Bottom));
635Zoom = Math.Max(Zoom - ZoomIncrement, MinZoom);
705SetCurrentValueInternal(ZoomProperty, Math.Max(Zoom - ZoomIncrement, MinZoom));
System\Windows\Controls\Grid.cs (27)
368gridDesiredSize.Width = Math.Max(gridDesiredSize.Width, child.DesiredSize.Width);
369gridDesiredSize.Height = Math.Max(gridDesiredSize.Height, child.DesiredSize.Height);
1089userMinSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize));
1113definitions[i].MeasureSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize));
1451double maxSize = Math.Max(definitions[i].UserMaxSize, minSize);
1659double maxSize = Math.Max(definitions[i].MinSize, definitions[i].UserMaxSize);
1698double userSize = Math.Max(availableSize - takenSize, 0.0) * (starValue / tempDefinitions[i].SizeCache);
1700resolvedSize = Math.Max(tempDefinitions[i].MinSize, resolvedSize);
1812double effectiveMaxSize = Math.Max(def.MinSize, def.UserMaxSize);
1884resolvedSize = Math.Max(resolvedDef.MinSize, resolvedDef.UserMaxSize);
2002double resolvedSize = (def.MeasureSize > 0.0) ? Math.Max(availableSize - takenSize, 0.0) * (def.MeasureSize / def.SizeCache) : 0.0;
2006resolvedSize = Math.Max(def.MinSize, resolvedSize);
2099double maxSize = Math.Max(definitions[i].MinSizeForArrange, definitions[i].UserMaxSize);
2140definitions[i].SizeCache = Math.Max(definitions[i].MinSizeForArrange, Math.Min(userSize, userMaxSize));
2185double userSize = Math.Max(finalSize - allPreferredArrangeSize, 0.0) * (starValue / definitions[definitionIndices[i]].SizeCache);
2187resolvedSize = Math.Max(definitions[definitionIndices[i]].MinSizeForArrange, resolvedSize);
2212final = Math.Max(final, definitions[definitionIndex].MinSizeForArrange);
2219final = Math.Max(final, definitions[definitionIndex].MinSizeForArrange);
2253final = Math.Max(final, definition.MinSizeForArrange);
2269final = Math.Max(final, definition.MinSizeForArrange);
2387double effectiveMaxSize = Math.Max(def.MinSizeForArrange, def.UserMaxSize);
2426def.SizeCache = Math.Max(def.MinSizeForArrange, Math.Min(userSize, userMaxSize));
2495resolvedSize = Math.Max(resolvedDef.MinSizeForArrange, resolvedDef.UserMaxSize);
2627double resolvedSize = (def.MeasureSize > 0.0) ? Math.Max(finalSize - takenSize, 0.0) * (def.MeasureSize / def.SizeCache) : 0.0;
2631resolvedSize = Math.Max(def.MinSizeForArrange, resolvedSize);
2722final = Math.Max(final, definition.MinSizeForArrange);
2738final = Math.Max(final, definition.MinSizeForArrange);
System\Windows\Controls\Slider.cs (10)
987valueToSize = Math.Max(0.0, (trackSize.Width - thumbSize.Width) / range);
993Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(Maximum - SelectionEnd, 0) * valueToSize);
997Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize);
1009valueToSize = Math.Max(0.0, (trackSize.Height - thumbSize.Height) / range);
1015Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize);
1019Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(Maximum - SelectionEnd,0) * valueToSize);
1052valueToSize = Math.Max(0.0, (trackSize.Width - thumbSize.Width) / range);
1076valueToSize = Math.Max(0.0, (trackSize.Height - thumbSize.Height) / range);
1205double next = SnapToTick(Math.Max(this.Minimum, Math.Min(this.Maximum, value + direction)));
1401this.SetCurrentValueInternal(ValueProperty, Math.Max(this.Minimum, Math.Min(this.Maximum, snappedValue)));
System\Windows\Controls\Stack.cs (8)
593stackDesiredSize.Height = Math.Max(stackDesiredSize.Height, childDesiredSize.Height);
598stackDesiredSize.Width = Math.Max(stackDesiredSize.Width, childDesiredSize.Width);
658offset.Y = Math.Max(0, Math.Min(offset.Y, extent.Height - viewport.Height));
666offset.X = Math.Max(0, Math.Min(offset.X, extent.Width - viewport.Width));
750rcChild.Height = Math.Max(arrangeSize.Height, child.DesiredSize.Height);
757rcChild.Width = Math.Max(arrangeSize.Width, child.DesiredSize.Width);
891double left = Math.Max(targetRectOffset, minPhysicalOffset);
892targetRectSize = Math.Max(Math.Min(targetRectSize + targetRectOffset, minPhysicalOffset + viewportSize) - left, 0);
System\Windows\Controls\TextBlock.cs (10)
1259Size contentSize = new Size(Math.Max(0.0, constraint.Width - (padding.Left + padding.Right)),
1260Math.Max(0.0, constraint.Height - (padding.Top + padding.Bottom)));
1299desiredSize.Width = Math.Max(desiredSize.Width, line.GetCollapsedWidth());
1522double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom);
1956Size contentSize = new Size(Math.Max(0.0, _referenceSize.Width - (padding.Left + padding.Right)),
1957Math.Max(0.0, _referenceSize.Height - (padding.Top + padding.Bottom)));
3096Size contentSize = new Size(Math.Max(0.0, computedSize.Width - (padding.Left + padding.Right)),
3097Math.Max(0.0, computedSize.Height - (padding.Top + padding.Bottom)));
3146double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom);
3176width = Math.Max(0.0, width - paddingWidth);
System\Windows\Controls\VirtualizingStackPanel.cs (109)
2615double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0);
3369arrangeLength = Math.Max(isHorizontal ? arrangeSize.Height : arrangeSize.Width, arrangeLength);
4738pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X));
4742logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X));
4774extendedViewport.Width = Math.Max(extendedViewport.Width + extendedViewport.X, 0.0);
4785extendedViewport.Width = Math.Max(_scrollData._extent.Width - extendedViewport.X, 0.0);
4814extendedViewport.Width = Math.Max(extendedViewport.Width / approxSizeOfLogicalUnit + extendedViewport.X, 0.0) * approxSizeOfLogicalUnit;
4825extendedViewport.Width = Math.Max(_scrollData._extent.Width - extendedViewport.X, 0.0) * approxSizeOfLogicalUnit;
4854pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y));
4858logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y));
4890extendedViewport.Height = Math.Max(extendedViewport.Height + extendedViewport.Y, 0.0);
4901extendedViewport.Height = Math.Max(_scrollData._extent.Height - extendedViewport.Y, 0.0);
4930extendedViewport.Height = Math.Max(extendedViewport.Height / approxSizeOfLogicalUnit + extendedViewport.Y, 0.0) * approxSizeOfLogicalUnit;
4941extendedViewport.Height = Math.Max(_scrollData._extent.Height - extendedViewport.Y, 0.0) * approxSizeOfLogicalUnit;
4953double factor = Math.Max(1.0, isHorizontal ? extendedViewport.Width / viewport.Width : extendedViewport.Height / viewport.Height);
5066viewport.Width = Math.Max(viewport.Width - sizeAfterStartViewportEdge, 0);
5070cacheBeforeSize = Math.Max(cacheBeforeSize - sizeBeforeStartViewportEdge, 0);
5074cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Width * sizeBeforeStartViewportEdge / pixelSize.Width), 0);
5101viewport.Width = Math.Max(0, parentViewport.Width - pixelSize.Width);
5116cacheAfterSize = Math.Max(cacheAfterSize - sizeAfterEndViewportEdge, 0);
5120cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Width * sizeAfterEndViewportEdge / pixelSize.Width), 0);
5132cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Width, 0);
5136cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Width, 0);
5165viewport.Height = Math.Max(viewport.Height - sizeAfterStartViewportEdge, 0);
5169cacheBeforeSize = Math.Max(cacheBeforeSize - sizeBeforeStartViewportEdge, 0);
5173cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Height * sizeBeforeStartViewportEdge / pixelSize.Height), 0);
5200viewport.Height = Math.Max(0, parentViewport.Height - pixelSize.Height);
5215cacheAfterSize = Math.Max(cacheAfterSize - sizeAfterEndViewportEdge, 0);
5219cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Height * sizeAfterEndViewportEdge / pixelSize.Height), 0);
5231cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Height, 0);
5235cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Height, 0);
5300cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.X);
5305viewport.Width = Math.Max(0, viewport.Width + viewport.X);
5325cacheBeforeSize = Math.Max(0, cacheBeforeSize - inset.Right);
5329cacheBeforeSize = Math.Max(0, cacheBeforeSize - 1);
5344viewport.Width = Math.Max(0, viewport.Width - inset.Left);
5355cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Left - viewport.Width));
5372cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Left);
5376cacheAfterSize = Math.Max(0, cacheAfterSize - 1);
5403cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.Y);
5408viewport.Height = Math.Max(0, viewport.Height + viewport.Y);
5428cacheBeforeSize = Math.Max(0, cacheBeforeSize - inset.Bottom);
5432cacheBeforeSize = Math.Max(0, cacheBeforeSize - 1);
5447viewport.Height = Math.Max(0, viewport.Height - inset.Top);
5458cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Top - viewport.Height));
5475cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Top);
5479cacheAfterSize = Math.Max(0, cacheAfterSize - 1);
5535double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0);
6707childViewport.Width = Math.Max(childViewport.Width - stackPixelSizeInViewport.Width, 0.0);
6712childViewport.Width = Math.Max(childViewport.Width - stackPixelSizeInViewport.Width, 0.0);
6720Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Width, 0.0),
6723Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Width, 0.0));
6731Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Width, 0.0),
6734Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Width, 0.0));
6753childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0);
6758childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0);
6766Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Height, 0.0),
6769Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Height, 0.0));
6777Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Height, 0.0),
6780Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Height, 0.0));
6887childLogicalSize.Width = Math.Max(itemDesiredSizes.LogicalSize.Width, logicalHeaderSize.Width);
6892childLogicalSize.Height = Math.Max(itemDesiredSizes.LogicalSize.Height, logicalHeaderSize.Height);
7091Size frontPixelSize = isHorizontal ? new Size(Math.Max(inset.Left,0), childDesiredSize.Height)
7092: new Size(childDesiredSize.Width, Math.Max(inset.Top, 0));
7105Size backPixelSize = isHorizontal ? new Size(Math.Max(inset.Right,0), childDesiredSize.Height)
7106: new Size(childDesiredSize.Width, Math.Max(inset.Bottom,0));
7119adjustedChildViewport.Width = Math.Max(0, adjustedChildViewport.Width - childPixelSizeInViewport.Width);
7125adjustedChildViewport.Height = Math.Max(0, adjustedChildViewport.Height - childPixelSizeInViewport.Height);
7210pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.X, childPixelSize.Width) ? Math.Max(childViewport.X, 0.0) : childPixelSize.Width;
7212pixelSizeAfterViewport = 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
7266double childPixelHeightInViewport = Math.Min(childViewport.Height, childPixelSize.Height - Math.Max(childViewport.Y, 0.0));
7269childPixelSizeInViewport.Height = Math.Max(childPixelSizeInViewport.Height, childPixelHeightInViewport);
7271childPixelSizeInCacheBeforeViewport.Height = Math.Max(childPixelSizeInCacheBeforeViewport.Height, childPixelHeightInViewport);
7273childPixelSizeInCacheAfterViewport.Height = Math.Max(childPixelSizeInCacheAfterViewport.Height, childPixelHeightInViewport);
7276childLogicalSizeInViewport.Height = Math.Max(childLogicalSizeInViewport.Height, childLogicalSize.Height);
7278childLogicalSizeInCacheBeforeViewport.Height = Math.Max(childLogicalSizeInCacheBeforeViewport.Height, childLogicalSize.Height);
7280childLogicalSizeInCacheAfterViewport.Height = Math.Max(childLogicalSizeInCacheAfterViewport.Height, childLogicalSize.Height);
7302pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.Y, childPixelSize.Height) ? Math.Max(childViewport.Y, 0.0) : childPixelSize.Height;
7304pixelSizeAfterViewport = 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
7358double childPixelWidthInViewport = Math.Min(childViewport.Width, childPixelSize.Width - Math.Max(childViewport.X, 0.0));
7361childPixelSizeInViewport.Width = Math.Max(childPixelSizeInViewport.Width, childPixelWidthInViewport);
7363childPixelSizeInCacheBeforeViewport.Width = Math.Max(childPixelSizeInCacheBeforeViewport.Width, childPixelWidthInViewport);
7365childPixelSizeInCacheAfterViewport.Width = Math.Max(childPixelSizeInCacheAfterViewport.Width, childPixelWidthInViewport);
7368childLogicalSizeInViewport.Width = Math.Max(childLogicalSizeInViewport.Width, childLogicalSize.Width);
7370childLogicalSizeInCacheBeforeViewport.Width = Math.Max(childLogicalSizeInCacheBeforeViewport.Width, childLogicalSize.Width);
7372childLogicalSizeInCacheAfterViewport.Width = Math.Max(childLogicalSizeInCacheAfterViewport.Width, childLogicalSize.Width);
7415sz1.Height = Math.Max(sz1.Height, sz2.Height);
7420sz1.Width = Math.Max(sz1.Width, sz2.Width);
7470childSize = new Size(Math.Max(headerDesiredSizes.PixelSize.Width, itemDesiredSizes.PixelSize.Width),
7475childSize = new Size(Math.Max(headerDesiredSizes.LogicalSize.Width, itemDesiredSizes.LogicalSize.Width),
7643Math.Max(1, itemDesiredSizes.LogicalSize.Height))
7644: new Size(Math.Max(1, itemDesiredSizes.LogicalSize.Width),
7785Math.Max(uniformOrAverageContainerPixelSize, dpiScale), // don't round down to 0
8458rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8483previousChildSize.Width = Math.Max(previousChildSize.Width, pixelHeaderSize.Width);
8490rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
8515previousChildSize.Height = Math.Max(previousChildSize.Height, pixelHeaderSize.Height);
8545rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8551rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
8589rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height);
8642rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width);
9645_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
9672_scrollData._maxDesiredSize.Width = Math.Max(_scrollData._maxDesiredSize.Width, stackPixelSize.Width);
10494_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height);
10521_scrollData._maxDesiredSize.Width = Math.Max(_scrollData._maxDesiredSize.Width, stackPixelSize.Width);
11165double visibleStart = Math.Max(start, 0);
11166double visibleEnd = Math.Max(Math.Min(end, viewportSize), visibleStart);
11257maxChildLength = Math.Max(maxChildLength, childSize.Height);
11261maxChildLength = Math.Max(maxChildLength, childSize.Width);
System\Windows\FrameworkElement.cs (28)
4045maxHeight = Math.Max(Math.Min(height, maxHeight), minHeight);
4048minHeight = Math.Max(Math.Min(maxHeight, height), minHeight);
4055maxWidth = Math.Max(Math.Min(width, maxWidth), minWidth);
4058minWidth = Math.Max(Math.Min(maxWidth, width), minWidth);
4326Math.Max(availableSize.Width - marginWidth, 0),
4327Math.Max(availableSize.Height - marginHeight, 0));
4375frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth));
4376frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
4389Math.Max(desiredSize.Width, mm.minWidth),
4390Math.Max(desiredSize.Height, mm.minHeight));
4454ltd?.TransformedUnroundedDS = new Size(Math.Max(0, clippedDesiredWidth), Math.Max(0, clippedDesiredHeight));
4500return new Size(Math.Max(0, clippedDesiredWidth), Math.Max(0, clippedDesiredHeight));
4562arrangeSize.Width = Math.Max(0, arrangeSize.Width - marginWidth);
4563arrangeSize.Height = Math.Max(0, arrangeSize.Height - marginHeight);
4572transformedUnroundedDS.Width = Math.Max(0, transformedUnroundedDS.Width - marginWidth);
4573transformedUnroundedDS.Height = Math.Max(0, transformedUnroundedDS.Height- marginHeight);
4582unclippedDesiredSize = new Size(Math.Max(0, this.DesiredSize.Width - marginWidth),
4583Math.Max(0, this.DesiredSize.Height - marginHeight));
4588unclippedDesiredSize.Width = Math.Max(transformedUnroundedDS.Width, unclippedDesiredSize.Width);
4589unclippedDesiredSize.Height = Math.Max(transformedUnroundedDS.Height, unclippedDesiredSize.Height);
4676double effectiveMaxWidth = Math.Max(unclippedDesiredSize.Width, mm.maxWidth);
4683double effectiveMaxHeight = Math.Max(unclippedDesiredSize.Height, mm.maxHeight);
4747Size clientSize = new Size(Math.Max(0, finalRect.Width - marginWidth),
4748Math.Max(0, finalRect.Height - marginHeight));
4917Size clippingSize = new Size(Math.Max(0, layoutSlotSize.Width - marginWidth),
4918Math.Max(0, layoutSlotSize.Height - marginHeight));
System\Windows\Window.cs (18)
1813frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth));
1814frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
1821Math.Max(desiredSize.Width, mm.minWidth),
1822Math.Max(desiredSize.Height, mm.minHeight));
1843arrangeBounds.Width = Math.Max(mm.minWidth, Math.Min(arrangeBounds.Width, mm.maxWidth));
1844arrangeBounds.Height = Math.Max(mm.minHeight, Math.Min(arrangeBounds.Height, mm.maxHeight));
1879Width = Math.Max(0.0, arrangeBounds.Width - frameSize.Width),
1880Height = Math.Max(0.0, arrangeBounds.Height - frameSize.Height)
3415Width = ((constraint.Width == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Width - frameSize.Width))),
3416Height = ((constraint.Height == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Height - frameSize.Height)))
3461maxWidthDeviceUnits = Math.Max(_trackMaxWidthDeviceUnits, _windowMaxWidthDeviceUnits);
3462maxHeightDeviceUnits = Math.Max(_trackMaxHeightDeviceUnits, _windowMaxHeightDeviceUnits);
3471mm.minWidth = Math.Max(this.MinWidth, minSizeLogicalUnits.X);
3493mm.minHeight = Math.Max(this.MinHeight, minSizeLogicalUnits.Y);
4717_windowMaxWidthDeviceUnits = Math.Max(_windowMaxWidthDeviceUnits, windowSize.X);
4718_windowMaxHeightDeviceUnits = Math.Max(_windowMaxHeightDeviceUnits, windowSize.Y);
7606return new Size(Math.Max(0.0, pt.X), Math.Max(0.0, pt.Y));
PresentationFramework.Aero (8)
PresentationFramework.Aero2 (8)
PresentationFramework.AeroLite (5)
PresentationFramework.Classic (7)
PresentationFramework.Luna (12)
PresentationFramework.Royale (11)
ReachFramework (13)
Roslyn.Diagnostics.Analyzers (8)
Roslyn.VisualStudio.DiagnosticsWindow (1)
System.Data.Common (1)
System.Diagnostics.Process (1)
System.Net.Http (1)
System.Private.CoreLib (6)
System.Windows.Controls.Ribbon (57)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupItemsPanel.cs (11)
82remainingHeightInColumn = Math.Max(0, finalSize.Height - childDesiredSize.Height);
104columnWidth = Math.Max(columnWidth, arrangeWidth);
135maxStarColumnWidth = Math.Max(maxStarColumnWidth, child.MaxWidth);
140maxStarColumnWidth = Math.Max(maxStarColumnWidth, Math.Min(child.MaxWidth, child.DesiredSize.Width));
222desiredHeight = Math.Min(Math.Max(desiredHeight, columnHeight), availableSize.Height);
247columnWidth = Math.Max(columnWidth, GetStarChildMinWidth(child as FrameworkElement, ref maxStarColumnWidth));
251columnWidth = Math.Max(columnWidth, childDesiredSize.Width);
252maxStarColumnWidth = Math.Max(maxStarColumnWidth, columnWidth);
257desiredHeight = Math.Min(Math.Max(desiredHeight, columnHeight), availableSize.Height);
357columnDesiredWidth = Math.Max(columnDesiredWidth, child.DesiredSize.Width);
374desiredWidth += Math.Max((columnDesiredWidth - starLayoutInfo.RequestedStarMinWidth), 0);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTitlePanel.cs (9)
85groupHeaderItemsControl.Measure(new Size(Math.Max(endContextualTabX - startContextualTabX, 0), availableSize.Height));
87desiredSize.Height = Math.Max(desiredSize.Height, groupHeaderItemsControl.DesiredSize.Height);
122availableToQat = Math.Max(availableToQat, 0);
129desiredSize.Height = Math.Max(desiredSize.Height, qat.DesiredSize.Height);
134endContextualTabX = Math.Max(endContextualTabX, availableToQat);
147availableToTitle = Math.Max(leftSpace, rightSpace);
153availableToTitle = Math.Max(availableToTitle, 0);
157desiredSize.Height = Math.Max(desiredSize.Height, titleHost.DesiredSize.Height);
201endContextualTabX = Math.Max(endContextualTabX, qatDesiredWidth);
System.Windows.Forms (2)
System.Windows.Input.Manipulations (1)
Text.Analyzers (8)