641 references to Max
Microsoft.Build (2)
BackEnd\Components\Caching\ConfigCache.cs (1)
283remainingToRelease = Convert.ToInt32(Math.Max(1, Math.Floor(_configurations.Count * 0.1)));
Evaluation\Expander.cs (1)
3905returnVal = Math.Max(arg0, arg1);
PresentationCore (63)
MS\Internal\Ink\CuspData.cs (1)
474rMax = Math.Max(a, rMax);
MS\Internal\Ink\EllipticalNodeOperations.cs (2)
34_radius = Math.Max(_radii.Width, _radii.Height); 759findex = Math.Abs(Math.Min(s1, s2) - 0d) < Math.Abs(Math.Max(s1, s2) - 1d) ? 0d : 1d;
MS\Internal\Ink\ErasingStroke.cs (1)
187Math.Max(lastFragment.EndFIndex, fragment.EndFIndex));
MS\Internal\Ink\Lasso.cs (2)
156DoubleUtil.LessThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 165if (DoubleUtil.GreaterThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
MS\Internal\Ink\StrokeRenderer.cs (7)
113if ((Math.Min(prevArea, currArea) / Math.Max(prevArea, currArea)) <= 0.70d) 254double maxExtent = Math.Max(drawingAttributes.Height, drawingAttributes.Width); 533if ((Math.Min(prevArea, currArea) / Math.Max(prevArea, currArea)) <= 0.90d) 838double intersectLeft = Math.Max(rect1.Left, rect2.Left); 839double intersectTop = Math.Max(rect1.Top, rect2.Top); 840double intersectWidth = Math.Max((double)(Math.Min(rect1.Right, rect2.Right) - intersectLeft), (double)0); 841double intersectHeight = Math.Max((double)(Math.Min(rect1.Bottom, rect2.Bottom) - intersectTop), (double)0);
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (8)
517if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) || 518(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) || 519(Math.Max(visEdgeStart.Y, visEdgeEnd.Y) < Math.Min(uv1.Y, uv2.Y)) || 520(Math.Min(visEdgeStart.Y, visEdgeEnd.Y) > Math.Max(uv1.Y, uv2.Y)))) 935if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) || 936(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) || 937(Math.Max(visEdgeStart.Y, visEdgeEnd.Y) < Math.Min(uv1.Y, uv2.Y)) || 938(Math.Min(visEdgeStart.Y, visEdgeEnd.Y) > Math.Max(uv1.Y, uv2.Y))))
MS\Internal\Media3D\LineUtil.cs (1)
287maxvalue = Math.Max(maxvalue,m[i,j]*m[i,j]);
MS\Internal\TextFormatting\SimpleTextLine.cs (3)
298realHeight = Math.Max(realHeight, run.Height); 299realAscent = Math.Max(realAscent, run.Baseline); 300realDescent = Math.Max(realDescent, run.Height - run.Baseline);
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
715value = Math.Max(value, Constants.DefaultIdealToReal);
System\Windows\Ink\Stroke2.cs (2)
393selectedDA.Height = Math.Max(selectedDA.Height, DrawingAttributes.DefaultHeight); 394selectedDA.Width = Math.Max(selectedDA.Width, DrawingAttributes.DefaultWidth);
System\Windows\Input\ManipulationLogic.cs (1)
506Radius = (float)Math.Max(1.0, pivot.Radius)
System\Windows\Input\Stylus\Pointer\PointerTabletDevice.cs (2)
143_doubleTapSize.Width = Math.Max(mouseDoubleTapDefault.Width, _doubleTapSize.Width); 144_doubleTapSize.Height = Math.Max(mouseDoubleTapDefault.Height, _doubleTapSize.Height);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (4)
299_cancelSize.Width = Math.Max(mouseDragDefault.Width, _cancelSize.Width); 300_cancelSize.Height = Math.Max(mouseDragDefault.Height, _cancelSize.Height); 307_doubleTapSize.Width = Math.Max(mouseDoubleTapDefault.Width, _doubleTapSize.Width); 308_doubleTapSize.Height = Math.Max(mouseDoubleTapDefault.Height, _doubleTapSize.Height);
System\Windows\Media\Animation\BackEase.cs (1)
44double amp = Math.Max(0.0, Amplitude);
System\Windows\Media\Animation\BounceEase.cs (1)
82double bounces = Math.Max(0.0, (double)Bounces);
System\Windows\Media\Animation\CircleEase.cs (1)
16normalizedTime = Math.Max(0.0, Math.Min(1.0, normalizedTime));
System\Windows\Media\Animation\Clock.cs (1)
4183long error = (long)Math.Max(_appliedSpeedRatio, 1.0);
System\Windows\Media\Animation\ElasticEase.cs (2)
72double oscillations = Math.Max(0.0, (double)Oscillations); 73double springiness = Math.Max(0.0, Springiness);
System\Windows\Media\Animation\PowerEase.cs (1)
47double power = Math.Max(0.0, Power);
System\Windows\Media\FormattedText.cs (4)
1803accBlackBoxRight = Math.Max(accBlackBoxRight, blackBoxRight); 1804accBlackBoxBottom = Math.Max(accBlackBoxBottom, blackBoxBottom); 1811metrics.Width = Math.Max(metrics.Width, currentLine.Width); 1812metrics.WidthIncludingTrailingWhitespace = Math.Max(metrics.WidthIncludingTrailingWhitespace, currentLine.WidthIncludingTrailingWhitespace);
System\Windows\Media\GlyphRun.cs (1)
1460return Math.Max(advance, oneSideBearing + otherSideBearing + 1);
System\Windows\Media\Imaging\BitmapSource.cs (2)
479return new Size(Math.Max(0, GetWidthInternal()), 480Math.Max(0, GetHeightInternal()));
System\Windows\Media3D\Quaternion.cs (5)
170double maxcoeff = Math.Max(Math.Abs(_x),Math.Max(Math.Abs(_y),Math.Abs(_z))); 445double max = Math.Max(Math.Max(Math.Abs(_x),Math.Abs(_y)), 446Math.Max(Math.Abs(_z),Math.Abs(_w)));
System\Windows\Media3D\Rect3D.cs (9)
100_sizeX = Math.Max(point1._x, point2._x) - _x; 101_sizeY = Math.Max(point1._y, point2._y) - _y; 102_sizeZ = Math.Max(point1._z, point2._z) - _z; 438double x = Math.Max(_x, rect._x); 439double y = Math.Max(_y, rect._y); 440double z = Math.Max(_z, rect._z); 479_sizeX = Math.Max(_x + _sizeX, rect._x + rect._sizeX) - x; 480_sizeY = Math.Max(_y + _sizeY, rect._y + rect._sizeY) - y; 481_sizeZ = Math.Max(_z + _sizeZ, rect._z + rect._sizeZ) - z;
PresentationFramework (445)
MS\Internal\Controls\InkCanvasInnerCanvas.cs (4)
97newSize.Width = Math.Max(newSize.Width, left + child.DesiredSize.Width); 101newSize.Width = Math.Max(newSize.Width, child.DesiredSize.Width); 107newSize.Height = Math.Max(newSize.Height, top + child.DesiredSize.Height); 111newSize.Height = Math.Max(newSize.Height, child.DesiredSize.Height);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (2)
1063offset = Math.Max(offset, -(rectStickyNote.Left - rectPage.Left)); 1074offset = Math.Max(offset, -(rectStickyNote.Top - rectPage.Top));
MS\Internal\Documents\DocumentGrid.cs (6)
585clippedHorizontalOffset = Math.Max(clippedHorizontalOffset, 0.0); 628clippedVerticalOffset = Math.Max(clippedVerticalOffset, 0.0); 1224pageOffset = new Point(Math.Max(ViewportWidth, ExtentWidth) - (xOffset + pageSize.Width), yOffset); 1606double centerWidth = Math.Max(ViewportWidth, ExtentWidth); 2370newScale = Math.Max(newScale, CurrentMinimumScale); 2699Math.Max(0.0, (ExtentWidth - row.RowSize.Width) / 2.0) : 0.0;
MS\Internal\Documents\FlowDocumentView.cs (2)
144Math.Max(0, Math.Min(_scrollData.ExtentWidth - _scrollData.ViewportWidth, _scrollData.HorizontalOffset)), 145Math.Max(0, Math.Min(_scrollData.ExtentHeight - _scrollData.ViewportHeight, _scrollData.VerticalOffset)));
MS\Internal\Documents\RowCache.cs (4)
475_extentWidth = Math.Max(currentRow.RowSize.Width, _extentWidth); 981_extentWidth = Math.Max(newRow.RowSize.Width, _extentWidth); 1109_extentWidth = Math.Max(row.RowSize.Width, _extentWidth); 1377_rowSize.Height = Math.Max(pageSize.Height, _rowSize.Height);
MS\Internal\Documents\ScrollData.cs (2)
135offset = Math.Max(0, Math.Min(_extent.Width - _viewport.Width, offset)); 157offset = Math.Max(0, Math.Min(_extent.Height - _viewport.Height, offset));
MS\Internal\Documents\TextBoxView.cs (5)
1791Math.Max(0, Math.Min(_scrollData.ExtentWidth - _scrollData.ViewportWidth, _scrollData.HorizontalOffset)), 1792Math.Max(0, Math.Min(_scrollData.ExtentHeight - _scrollData.ViewportHeight, _scrollData.VerticalOffset))); 2281desiredSize.Width = Math.Max(desiredSize.Width, line.Width); 2651desiredSize.Width = Math.Max(desiredSize.Width, _lineMetrics[i].Width); 3130padding = Math.Max(0, viewport.Height - _contentSize.Height);
MS\Internal\Documents\TextParagraphView.cs (2)
724siblingGap = Math.Max(lineBox.X - (siblingLineBox.X + siblingLineBox.Width), 0); 753siblingGap = Math.Max(siblingLineBox.X - (lineBox.X + lineBox.Width), 0);
MS\Internal\Helper.cs (7)
1081headerSize.Height = Math.Max(itemsCorrectionFactor.Top, headerSize.Height); 1085headerSize.Height = Math.Max(virtualizingElement.DesiredSize.Height, headerSize.Height); 1087headerSize.Width = Math.Max(virtualizingElement.DesiredSize.Width, headerSize.Width); 1118itemPixelSize.Width = Math.Max(desiredSize.Width, itemPixelSize.Width); 1131itemPixelSizeBeforeViewport.Width = Math.Max(desiredSize.Width, itemPixelSizeBeforeViewport.Width); 1143itemPixelSizeInViewport.Width = Math.Max(desiredSize.Width, itemPixelSizeInViewport.Width); 1154itemPixelSizeAfterViewport.Width = Math.Max(desiredSize.Width, itemPixelSizeAfterViewport.Width);
MS\Internal\Ink\LassoHelper.cs (3)
238&& DoubleUtil.LessThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 247if (DoubleUtil.GreaterThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 253if ((0 == i) && DoubleUtil.AreClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
MS\Internal\PtsHost\CellParagraph.cs (1)
81Math.Max(TextDpi.FromTextDpi(dvrAvailable), 0));
MS\Internal\PtsHost\FigureHelper.cs (2)
184value = Math.Max(1, Math.Min(value, structuralCache.CurrentFormatContext.PageHeight)); 189value = Math.Max(1, Math.Min(value, structuralCache.CurrentFormatContext.PageHeight - pageMargin.Top - pageMargin.Bottom));
MS\Internal\PtsHost\FigureParagraph.cs (2)
617width = Math.Max(TextDpi.MinWidth, maxTotalWidth - elementMarginWidth); 646height = Math.Max(TextDpi.MinWidth, maxTotalHeight - elementMarginHeight);
MS\Internal\PtsHost\PtsHelper.cs (2)
885columnWidth = Math.Max(1, Math.Min(columnWidth, pageWidth)); 887freeSpace = Math.Max(0, freeSpace);
MS\Internal\PtsHost\PtsPage.cs (6)
781_calculatedSize.Width = Math.Max(TextDpi.MinWidth, TextDpi.FromTextDpi(rect.du)); 782_calculatedSize.Height = Math.Max(TextDpi.MinWidth, TextDpi.FromTextDpi(rect.dv)); 786_contentSize.Width = Math.Max(Math.Max(TextDpi.FromTextDpi(bbox.fsrc.du), TextDpi.MinWidth), _calculatedSize.Width); 787_contentSize.Height = Math.Max(TextDpi.MinWidth, TextDpi.FromTextDpi(bbox.fsrc.dv)); 793_contentSize.Height = Math.Max(_contentSize.Height, _calculatedSize.Height);
MS\Internal\PtsHost\TextParaClient.cs (2)
2084lineRect.Width = Math.Max(lineVisual.WidthIncludingTrailingWhitespace, 0); 2195elementRect.Width = Math.Max(lineVisual.WidthIncludingTrailingWhitespace, 0);
MS\Internal\PtsHost\UIElementParagraph.cs (2)
407elementHeight = Math.Max(TextDpi.FromTextDpi(1), elementHeight - TextDpi.FromTextDpi(mbp.MBPTop + mbp.MBPBottom)); 428elementHeight = Math.Max(TextDpi.FromTextDpi(1), elementHeight);
MS\Internal\Text\DynamicPropertyReader.cs (1)
217return Math.Max(TextDpi.MinWidth, Math.Min(TextDpi.MaxWidth, lineHeight));
MS\Internal\Text\LineProperties.cs (2)
187lineAdvance = Math.Max(lineAdvance, _lineHeight); 219lineAdvance = Math.Max(lineAdvance, _lineHeight);
MS\Internal\Text\TextDpi.cs (2)
167pageMargin.Right = Math.Max(0.0, pageSize.Width - pageMargin.Left - _minSize); 176pageMargin.Bottom = Math.Max(0.0, pageSize.Height - pageMargin.Top - _minSize);;
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\DataGridCellsPanel.cs (5)
190measureHeight = Math.Max(measureHeight, blockMeasureSize.Height); 402measureSize.Height = Math.Max(measureSize.Height, childSize.Height); 422measureSize.Height = Math.Max(measureSize.Height, headerSize.Height); 617measureHeight = Math.Max(measureHeight, childSize.Height); 1908childMeasureWidth = Math.Max(averageColumnWidth, column.MinWidth);
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\DataGridHelper.cs (3)
39return new Size(size.Width, Math.Max(0.0, size.Height - thickness)); 43return new Size(Math.Max(0.0, size.Width - thickness), size.Height); 722value = Math.Max(value, minValue);
System\Windows\Controls\DataGridRow.cs (1)
553double minHeight = Math.Max(RowHeader.DesiredSize.Height, MinHeight);
System\Windows\Controls\DefinitionBase.cs (2)
133_minSize = Math.Max(_minSize, minSize); 883sharedMinSize = Math.Max(sharedMinSize, _registry[i]._minSize);
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\DocumentViewer.cs (2)
1408VerticalOffset = Math.Max(verticalOffset, 0.0); 1409HorizontalOffset = Math.Max(horizontalOffset, 0.0);
System\Windows\Controls\FlowDocumentReader.cs (1)
734SetCurrentValueInternal(ZoomProperty, Math.Max(Zoom - ZoomIncrement, MinZoom));
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\GridSplitter.cs (5)
664_resizeData.Adorner.OffsetX = Math.Min(Math.Max(horizontalChange, _resizeData.MinChange), _resizeData.MaxChange); 668_resizeData.Adorner.OffsetY = Math.Min(Math.Max(verticalChange, _resizeData.MinChange), _resizeData.MaxChange); 802definition1Min = Math.Max(definition1Min, _resizeData.SplitterLength); 806definition2Min = Math.Max(definition2Min, _resizeData.SplitterLength); 921delta = Math.Min(Math.Max(delta, min), max);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (4)
262double childConstraintWidth = Math.Max(0.0, constraint.Width - accumulatedWidth); 299maxHeight = Math.Max(maxHeight, child.DesiredSize.Height); 306maxHeight = Math.Max(maxHeight, _paddingHeader.DesiredSize.Height); 389rect = new Rect(accumulatedWidth, 0.0, Math.Max(remainingWidth, 0.0), arrangeSize.Height);
System\Windows\Controls\GridViewRowPresenter.cs (2)
148double childConstraintWidth = Math.Max(0.0, constraint.Width - accumulatedWidth); 192maxHeight = Math.Max(maxHeight, child.DesiredSize.Height);
System\Windows\Controls\InkPresenter.cs (2)
177newSize.Width = Math.Max(newSize.Width, sizeStrokes.Width); 178newSize.Height = Math.Max(newSize.Height, sizeStrokes.Height);
System\Windows\Controls\ItemsControl.cs (2)
2811return FindFocusable((int)(ScrollHost.VerticalOffset + Math.Max(ScrollHost.ViewportHeight - 1, 0)), 2825return FindFocusable((int)(ScrollHost.HorizontalOffset + Math.Max(ScrollHost.ViewportWidth - 1, 0)),
System\Windows\Controls\MenuScrollingVisibilityConverter.cs (1)
90double percent = Math.Min(100.0, Math.Max(0.0, (verticalOffset * 100.0 / (extentHeight - viewportHeight))));
System\Windows\Controls\Primitives\BulletDecorator.cs (5)
258contentConstraint.Width = Math.Max(0.0, contentConstraint.Width - bulletSize.Width); 264Size desiredSize = new Size(bulletSize.Width + contentSize.Width, Math.Max(bulletSize.Height, contentSize.Height)); 300contentSize.Width = Math.Max(content.DesiredSize.Width, arrangeSize.Width - bullet.DesiredSize.Width); 301contentSize.Height = Math.Max(content.DesiredSize.Height, arrangeSize.Height); 306bulletOffsetY += Math.Max(0d, centerY - bulletSize.Height * 0.5d);
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (7)
122desiredSize.Width = Math.Max(desiredSize.Width, indicatorSize.Width); 123desiredSize.Height = Math.Max(desiredSize.Height, indicatorSize.Height); 130desiredSize.Width = Math.Max(desiredSize.Width, indicatorSize.Width); 131desiredSize.Height = Math.Max(desiredSize.Height, indicatorSize.Height); 154childRect.Width = Math.Max(finalSize.Width, dataGrid.CellsPanelActualWidth); 698height = Math.Max(_draggingSrcColumnHeader.RenderSize.Height, _columnHeaderDragIndicator.Height); 922columnEstimatedWidth = Math.Max(averageColumnWidth, column.MinWidth);
System\Windows\Controls\Primitives\Popup.cs (8)
2253limitSize.Height = Math.Max(0.0, Math.Max(screenBounds.Bottom - targetBounds.Bottom, targetBounds.Top - screenBounds.Top)); 2257limitSize.Width = Math.Max(0.0, Math.Max(screenBounds.Right - targetBounds.Right, targetBounds.Left - screenBounds.Left)); 2275limitSize.Width = Math.Max(0.0, Math.Max(screenBounds.Right - targetBounds.Right, targetBounds.Left - screenBounds.Left)); 2279limitSize.Height = Math.Max(0.0, Math.Max(screenBounds.Bottom - targetBounds.Bottom, targetBounds.Top - screenBounds.Top));
System\Windows\Controls\Primitives\ScrollBar.cs (3)
425newValue = Math.Min(Math.Max(newValue, Minimum), Maximum); 555double newValue = Math.Max(Value - SmallChange, Minimum); 573double newValue = Math.Max(Value - LargeChange, Minimum);
System\Windows\Controls\Primitives\ScrollContentPresenter.cs (3)
494childRect.Width = Math.Max(childRect.Width, arrangeSize.Width); 495childRect.Height = Math.Max(childRect.Height, arrangeSize.Height); 697return Math.Max(0.0, offset);
System\Windows\Controls\Primitives\TabPanel.cs (5)
212desiredSizeWithoutMargin.Height = Math.Max(0d, element.DesiredSize.Height - margin.Top - margin.Bottom); 213desiredSizeWithoutMargin.Width = Math.Max(0d, element.DesiredSize.Width - margin.Left - margin.Right); 284childSize.Height = Math.Max(0d, childSize.Height - topOffset - bottomOffset); 285childSize.Width = Math.Max(0d, childSize.Width - leftOffset - rightOffset); 416currentAverageGap = Math.Max(0d, (rowWidthLimit - currentRowWidth) / numberOfHeadersInCurrentRow); // The amout of width that should be added to justify the header
System\Windows\Controls\Primitives\ToolBarOverflowPanel.cs (5)
131_panelSize.Width = Math.Max(curLineSize.Width, _panelSize.Width); 137_panelSize.Width = Math.Max(sz.Width, _panelSize.Width); 145curLineSize.Height = Math.Max(sz.Height, curLineSize.Height); 150_panelSize.Width = Math.Max(curLineSize.Width, _panelSize.Width); 186curLineSize.Height = Math.Max(sz.Height, curLineSize.Height);
System\Windows\Controls\Primitives\ToolBarPanel.cs (6)
125panelDesiredSize.Height = Math.Max(panelDesiredSize.Height, childDesiredSize.Height); 129panelDesiredSize.Width = Math.Max(panelDesiredSize.Width, childDesiredSize.Width); 184panelDesiredSize.Height = Math.Max(panelDesiredSize.Height, childDesiredSize.Height); 189panelDesiredSize.Width = Math.Max(panelDesiredSize.Width, childDesiredSize.Width); 313rcChild.Height = Math.Max(arrangeSize.Height, child.DesiredSize.Height); 320rcChild.Width = Math.Max(arrangeSize.Width, child.DesiredSize.Width);
System\Windows\Controls\Primitives\Track.cs (6)
82return Math.Max(Minimum, Math.Min(Maximum, val)); 482double viewportSize = Math.Max(0.0, ViewportSize); 581double range = Math.Max(0.0, Maximum - min); 620double range = Math.Max(0.0, Maximum - min); 625double extent = Math.Max(0.0, range) + viewportSize; 651thumbLength = Math.Max(thumbMinLength, thumbLength);
System\Windows\Controls\ScrollViewer.cs (3)
409get { return Math.Max(0.0, ExtentWidth - ViewportWidth); } 417get { return Math.Max(0.0, ExtentHeight - ViewportHeight); } 1810double newUnused = Math.Max(unused + delta, 0);
System\Windows\Controls\SinglePageViewer.cs (5)
704Math.Max(ia.OriginWidth, pagePadding.Left), 705Math.Max(ia.OriginHeight, pagePadding.Top), 706Math.Max(ia.MediaSizeWidth - (ia.OriginWidth + ia.ExtentWidth), pagePadding.Right), 707Math.Max(ia.MediaSizeHeight - (ia.OriginHeight + ia.ExtentHeight), pagePadding.Bottom)); 757SetCurrentValueInternal(ZoomProperty, Math.Max(Zoom - ZoomIncrement, MinZoom));
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\StickyNote.cs (2)
1150horizontalChange = Math.Min(Math.Max(minBoundary.X, horizontalChange), maxBoundary.X); 1151verticalChange = Math.Min(Math.Max(minBoundary.Y, verticalChange), maxBoundary.Y);
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\ToolBar.cs (2)
558extraLength = Math.Max(0.0, desiredSize.Width - toolBarPanel.DesiredSize.Width + margin.Left + margin.Right); 562extraLength = Math.Max(0.0, desiredSize.Height - toolBarPanel.DesiredSize.Height + margin.Top + margin.Bottom);
System\Windows\Controls\ToolBarTray.cs (5)
389bandThickness = Math.Max(bandThickness, fHorizontal ? toolBar.DesiredSize.Height : toolBar.DesiredSize.Width); 404toolBarTrayDesiredSize.Width = Math.Max(toolBarTrayDesiredSize.Width, bandLength); 409toolBarTrayDesiredSize.Height = Math.Max(toolBarTrayDesiredSize.Height, bandLength); 800currentToolBar.Width = Math.Max(currentToolBar.MinLength, currentToolBar.RenderSize.Width - toolBarOffset + position); 802currentToolBar.Height = Math.Max(currentToolBar.MinLength, currentToolBar.RenderSize.Height - toolBarOffset + position);
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\Controls\WrapPanel.cs (5)
253panelSize.U = Math.Max(curLineSize.U, panelSize.U); 259panelSize.U = Math.Max(sz.U, panelSize.U); 267curLineSize.V = Math.Max(sz.V, curLineSize.V); 272panelSize.U = Math.Max(curLineSize.U, panelSize.U); 327curLineSize.V = Math.Max(sz.V, curLineSize.V);
System\windows\Documents\CaretElement.cs (2)
411scroller.ScrollToVerticalOffset(Math.Max(0, scroller.VerticalOffset - deltaToScroll - scrollerHeight / 4)); 428scroller.ScrollToHorizontalOffset(Math.Max(0, scroller.HorizontalOffset - deltaToScroll - scrollerWidth / 4));
System\Windows\Documents\FixedPageStructure.cs (2)
163double absVerDistance = Math.Max(0, (pt.Y > lineResult.LayoutBox.Y) ? (pt.Y - lineResult.LayoutBox.Bottom) : (lineResult.LayoutBox.Y - pt.Y)); 164double absHorDistance = Math.Max(0, (pt.X > lineResult.LayoutBox.X) ? (pt.X - lineResult.LayoutBox.Right) : (lineResult.LayoutBox.X - pt.X));
System\Windows\Documents\FixedTextBuilder.cs (1)
882double maxHeight = Math.Max(box1.Height, box2.Height);
System\Windows\Documents\FixedTextView.cs (2)
848double horizontalDistance = Math.Max(0, (transformedPt.X > alignmentRect.X) ? (transformedPt.X - alignmentRect.Right) : (alignmentRect.X - transformedPt.X)); 849double verticalDistance = Math.Max(0, (transformedPt.Y > alignmentRect.Y) ? (transformedPt.Y - alignmentRect.Bottom) : (alignmentRect.Y - transformedPt.Y));
System\Windows\Documents\Glyphs.cs (2)
157Math.Max(0, designRect.Right), 158Math.Max(0, designRect.Bottom)
System\Windows\Documents\ImmComposition.cs (2)
675milPointBottomRight = new Point(Math.Max(rectStart.Left, rectEnd.Left), Math.Max(rectStart.Bottom, rectEnd.Bottom));
System\Windows\Documents\Table.cs (1)
207get { return Math.Max(CellSpacing, 0); }
System\Windows\Documents\TextRangeEdit.cs (1)
2370double retValue = Math.Max(_lowerBound, value);
System\Windows\Documents\TextRangeEditTables.cs (3)
1710_dxr = Math.Max(_dxr, 0.0); 1733xPosAdorner = Math.Max(xPosAdorner, _columnRect.Left - this.LeftDragMax); 1745dx = Math.Max(dx, - this.LeftDragMax);
System\Windows\Documents\TextStore.cs (2)
1001milPointBottomRight = new Point(Math.Max(rectPrev.Left, rectCur.Left), Math.Max(rectPrev.Bottom, rectCur.Bottom));
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\Input\KeyboardNavigation.cs (4)
2518rect.Height = Math.Min(Math.Max(before, 0.0d), rect.Height); 2522double height = Math.Min(Math.Max(after, 0.0d), rect.Height); 2670endRange = Math.Max(endRange, _horizontalBaseline); 2691endRange = Math.Max(endRange, _verticalBaseline);
System\Windows\Shapes\Ellipse.cs (3)
102width = Math.Max(width, height); 125Math.Max(0, finalSize.Width - penThickness), // Width 126Math.Max(0, finalSize.Height - penThickness)); // Height
System\Windows\Shapes\Rectangle.cs (3)
154width = Math.Max(width, height); 178Math.Max(0, finalSize.Width - penThickness), // Width 179Math.Max(0, finalSize.Height - penThickness)); // Height
System\Windows\Shapes\Shape.cs (4)
587xScale = Math.Max(availableSize.Width - strokeThickness, 0); 588yScale = Math.Max(availableSize.Height - strokeThickness, 0); 715return new Size(Math.Max(bounds.Right, 0), 716Math.Max(bounds.Bottom, 0));
System\Windows\Shell\TaskbarItemInfo.cs (1)
108progressValue = Math.Max(progressValue, 0);
System\Windows\Shell\WindowChromeWorker.cs (4)
1228deviceGlassThickness.Top = Math.Max(0, deviceGlassThickness.Top); 1233deviceGlassThickness.Left = Math.Max(0, deviceGlassThickness.Left); 1238deviceGlassThickness.Bottom = Math.Max(0, deviceGlassThickness.Bottom); 1243deviceGlassThickness.Right = Math.Max(0, deviceGlassThickness.Right);
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));
PresentationFramework.Aero (8)
Microsoft\Windows\Themes\ButtonChrome.cs (2)
452childArrangeRect.Width = Math.Max(0d, finalSize.Width - 4.0); 453childArrangeRect.Height = Math.Max(0d, finalSize.Height - 4.0);
Microsoft\Windows\Themes\ScrollChrome.cs (1)
471bounds.Width = Math.Max(0.0, bounds.Width - 1.0);
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
193childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 198childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 233double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 234double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 300return Math.Max(0.0, d);
PresentationFramework.Aero2 (8)
Microsoft\Windows\Themes\ButtonChrome.cs (2)
452childArrangeRect.Width = Math.Max(0d, finalSize.Width - 4.0); 453childArrangeRect.Height = Math.Max(0d, finalSize.Height - 4.0);
Microsoft\Windows\Themes\ScrollChrome.cs (1)
471bounds.Width = Math.Max(0.0, bounds.Width - 1.0);
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
193childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 198childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 233double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 234double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 300return Math.Max(0.0, d);
PresentationFramework.AeroLite (5)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
193childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 198childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 233double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 234double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 300return Math.Max(0.0, d);
PresentationFramework.Classic (7)
Microsoft\Windows\Themes\ClassicBorderDecorator.cs (2)
603Math.Max(0.0, rt.Width - thick.Left - thick.Right), 604Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
193childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 198childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 233double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 234double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 300return Math.Max(0.0, d);
PresentationFramework.Luna (12)
Microsoft\Windows\Themes\ButtonChrome.cs (2)
367childArrangeRect.Width = Math.Max(0d, finalSize.Width - sideThickness2); 368childArrangeRect.Height = Math.Max(0d, finalSize.Height - sideThickness2);
Microsoft\Windows\Themes\ScrollChrome.cs (1)
310bounds.Width = Math.Max(0.0, bounds.Width - 1.0);
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\BulletChrome.cs (4)
217Math.Max(0, bounds.Width - thickness.Left - thickness.Right), 218Math.Max(0, bounds.Height - thickness.Top - thickness.Bottom)); 459Math.Max(0.0, rt.Width - thick.Left - thick.Right), 460Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
193childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 198childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 233double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 234double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 300return Math.Max(0.0, d);
PresentationFramework.Royale (11)
Microsoft\Windows\Themes\ButtonChrome.cs (2)
325childArrangeRect.Width = Math.Max(0d, finalSize.Width - sideThickness2); 326childArrangeRect.Height = Math.Max(0d, finalSize.Height - sideThickness2);
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\BulletChrome.cs (4)
217Math.Max(0, bounds.Width - thickness.Left - thickness.Right), 218Math.Max(0, bounds.Height - thickness.Top - thickness.Bottom)); 459Math.Max(0.0, rt.Width - thick.Left - thick.Right), 460Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
193childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 198childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 233double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 234double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 300return Math.Max(0.0, d);
ReachFramework (13)
AlphaFlattener\BrushProxy.cs (5)
1930stopDistance = Math.Max(b.RadiusX, b.RadiusY) * (second.Offset - first.Offset); 3747max = Math.Max(max, offset); 3902return (int)Math.Ceiling(Math.Max(5, step)); // At least five. Radials look bad with less steps. 4397maxt = Math.Max(maxt, one); 4405maxt = Math.Max(maxt, two);
AlphaFlattener\DrawingContext.cs (1)
664return 512 + Configuration.RasterizationCost(Math.Max(bounds.Width, bounds.Height));
AlphaFlattener\ImageProxy.cs (2)
488int x0 = (int)Math.Max(Math.Floor(bounds.Left), 0); 489int y0 = (int)Math.Max(Math.Floor(bounds.Top), 0);
AlphaFlattener\Utility.cs (2)
235return Math.Max(GetScaleX(trans), GetScaleY(trans)); 1704scale = Math.Max(viewport.Width / viewbox.Width, viewport.Height / viewbox.Height);
Serialization\VisualSerializer.cs (3)
481scalex = Math.Max(dstwidth / srcwidth, dstheight / srcheight); 934WriteAttr("StrokeMiterLimit", Math.Max(1.0, pen.MiterLimit)); 2266WriteAttr("Opacity", Math.Min(Math.Max( opacity, 0.0),1.0));
System.Data.Common (1)
System\Data\Common\DoubleStorage.cs (1)
124max = Math.Max(_values[record], max);
System.Diagnostics.Process (1)
System\Diagnostics\ProcessWaitState.Unix.cs (1)
427(int)Math.Max(millisecondsTimeout - Stopwatch.GetElapsedTime(startTime).TotalMilliseconds, 0);
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
114long heartBeatInterval = (long)Math.Max(1000, Math.Min(_settings._keepAlivePingDelay.TotalMilliseconds, _settings._keepAlivePingTimeout.TotalMilliseconds) / 4);
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
995public static double Max(double x, double y) => Math.Max(x, y);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (5)
235throughputErrorEstimate = Math.Max(throughputErrorEstimate, (GetWaveComponent(_samples, sampleCount, adjacentPeriod2) / averageThroughput).Abs()); 271double noiseForConfidence = Math.Max(_averageThroughputNoise, throughputErrorEstimate); 288double move = Math.Min(1.0, Math.Max(-1.0, ratio.Real)); 293move *= Math.Min(1.0, Math.Max(0.0, confidence)); 333_currentControlSetting = Math.Max(minThreads, _currentControlSetting);
System.Windows.Controls.Ribbon (57)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonContextualTabGroupsPanel.cs (3)
93desiredSize.Height = Math.Max(desiredSize.Height, tabGroupHeader.DesiredSize.Height); 113double width = Math.Max(tabGroupHeader.ArrangeWidth,0); 118tabGroupHeader.Arrange(new Rect(startX, y, width, Math.Max(0.0, height - 1)));
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryCategoriesPanel.cs (6)
392maxChildWidth = Math.Max(maxChildWidth, childSize.Width); 393maxChildHeight = Math.Max(maxChildHeight, childSize.Height); 467stackDesiredSize.Width = Math.Max(stackDesiredSize.Width, childDesiredSize.Width); 498viewportOffsetY = Math.Max(viewportOffsetY - logicalVisibleSpace, 0.0); 501offset.X = Math.Max(0, Math.Min(offset.X, extent.Width - viewport.Width)); 607rcChild.Width = Math.Max(finalSize.Width, child.DesiredSize.Width);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryItemsPanel.cs (6)
346maxColumnWidth = Math.Max(maxColumnWidth, childSize.Width); 347maxItemHeight = Math.Max(maxItemHeight, childSize.Height); 381arrangeWidth = Math.Max(availableSize.Width / columnCount, maxColumnWidth); 397_arrangeWidth = Math.Max(availableSize.Width / columnCount, maxColumnWidth); 419maxRowHeight = Math.Max(maxRowHeight, childSize.Height); 581maxRowHeight = Math.Max(maxRowHeight, children[i].DesiredSize.Height);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupItemsPanel.cs (11)
85remainingHeightInColumn = Math.Max(0, finalSize.Height - childDesiredSize.Height); 107columnWidth = Math.Max(columnWidth, arrangeWidth); 138maxStarColumnWidth = Math.Max(maxStarColumnWidth, child.MaxWidth); 143maxStarColumnWidth = Math.Max(maxStarColumnWidth, Math.Min(child.MaxWidth, child.DesiredSize.Width)); 225desiredHeight = Math.Min(Math.Max(desiredHeight, columnHeight), availableSize.Height); 250columnWidth = Math.Max(columnWidth, GetStarChildMinWidth(child as FrameworkElement, ref maxStarColumnWidth)); 254columnWidth = Math.Max(columnWidth, childDesiredSize.Width); 255maxStarColumnWidth = Math.Max(maxStarColumnWidth, columnWidth); 260desiredHeight = Math.Min(Math.Max(desiredHeight, columnHeight), availableSize.Height); 360columnDesiredWidth = Math.Max(columnDesiredWidth, child.DesiredSize.Width); 377desiredWidth += Math.Max((columnDesiredWidth - starLayoutInfo.RequestedStarMinWidth), 0);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupsPanel.cs (1)
161remainingSpace = Math.Max(0, remainingSpace - 1);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonMenuItemsPanel.cs (3)
142maxChildWidth = Math.Max(availableSize.Width, maxChildWidth); 159double surplusHeight = Math.Max(remainingHeight, 0.0) / _registeredStarLayoutProviders.Count; 176desiredSize.Width = Math.Max(starLayoutTarget.DesiredSize.Width, desiredSize.Width);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonQuickAccessToolBarOverflowPanel.cs (2)
35panelDesiredSize.Height = Math.Max(panelDesiredSize.Height, child.DesiredSize.Height); 54rcChild.Height = Math.Max(finalSize.Height, child.DesiredSize.Height);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonQuickAccessToolBarPanel.cs (2)
223panelDesiredSize.Height = Math.Max(panelDesiredSize.Height, childDesiredSize.Height); 291rcChild.Height = Math.Max(finalSize.Height, child.DesiredSize.Height);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonScrollButtonVisibilityConverter.cs (1)
96double percent = Math.Min(100.0, Math.Max(0.0, (offset * 100.0 / (extent - viewport))));
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (9)
93_separatorOpacity = Math.Max(0.0, reducePaddingRegularTabHeader * 0.2); 399desiredSize.Height = Math.Max(desiredSize.Height, ribbonTabHeader.DesiredSize.Height); 416desiredSize.Height = Math.Max(desiredSize.Height, child.DesiredSize.Height); 447double leftPadding = Math.Max(0, ribbonTabHeader.DefaultPadding.Left - (isContextualTab ? reducePaddingContextualTabHeader : reducePaddingRegularTabHeader)); 448double rightPadding = Math.Max(0, ribbonTabHeader.DefaultPadding.Right - (isContextualTab ? reducePaddingContextualTabHeader : reducePaddingRegularTabHeader)); 454desiredSize.Height = Math.Max(desiredSize.Height, ribbonTabHeader.DesiredSize.Height); 465desiredSize.Height = Math.Max(desiredSize.Height, child.DesiredSize.Height); 530return Math.Max(_tabHeaderMinWidth, maxTabHeaderWidth); 1067return Math.Max(0.0, offset);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabsPanel.cs (3)
46returnSize = new Size(Math.Max(returnSize.Width, childSize.Width), Math.Max(returnSize.Height, childSize.Height)); 305return Math.Max(0.0, offset);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTitlePanel.cs (9)
90groupHeaderItemsControl.Measure(new Size(Math.Max(endContextualTabX - startContextualTabX, 0), availableSize.Height)); 92desiredSize.Height = Math.Max(desiredSize.Height, groupHeaderItemsControl.DesiredSize.Height); 127availableToQat = Math.Max(availableToQat, 0); 134desiredSize.Height = Math.Max(desiredSize.Height, qat.DesiredSize.Height); 139endContextualTabX = Math.Max(endContextualTabX, availableToQat); 152availableToTitle = Math.Max(leftSpace, rightSpace); 158availableToTitle = Math.Max(availableToTitle, 0); 162desiredSize.Height = Math.Max(desiredSize.Height, titleHost.DesiredSize.Height); 206endContextualTabX = Math.Max(endContextualTabX, qatDesiredWidth);
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (1)
398_textBlock1.Width = Math.Max(1.0, width / 2.0);
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
1344smoothingLevel = Math.Max(0, Math.Min(1, smoothingLevel));