src\Framework\System\Windows\Controls\DataGridColumnCollection.cs (10)
1277double displayValue = Math.Min(width.DesiredValue, maxWidth);
1369column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, Math.Min(width.DesiredValue, maxWidth)));
1788double maxColumnResizeWidth = expandBeyondDesiredWidth ? column.MaxWidth : Math.Min(width.DesiredValue, column.MaxWidth);
1923column.UpdateWidthForStarColumn(Math.Min(columnDesiredWidth, column.MaxWidth), columnDesiredWidth, columnDesiredWidth / perStarWidth);
2010double usedStarSpace = ComputeStarColumnWidths(Math.Min(expectedStarSpace, sumOfStarMaxWidths));
2081double lagWidth = Math.Min(width.DesiredValue, columnMaxWidth) - width.DisplayValue;
2112if (DoubleUtil.LessThan(width.DisplayValue, Math.Min(width.DesiredValue, column.MaxWidth)))
2140giveAwayWidth -= Math.Min(contributingSpace, giveAwayWidth);
2147giveAwayWidth = Math.Min(giveAwayWidth, Math.Max(0d, totalSpace - usedSpace));
2194return Math.Min(usedSpace - totalAvailableWidth, takeAwayWidth);
src\Framework\System\Windows\Controls\Grid.cs (19)
1169userMinSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize));
1193definitions[i].MeasureSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize));
1294DefinitionsU[PrivateCells[i].ColumnIndex].UpdateMinSize(Math.Min(children[i].DesiredSize.Width, DefinitionsU[PrivateCells[i].ColumnIndex].UserMaxSize));
1311DefinitionsV[PrivateCells[i].RowIndex].UpdateMinSize(Math.Min(children[i].DesiredSize.Height, DefinitionsV[PrivateCells[i].RowIndex].UserMaxSize));
1584double newMinSize = Math.Min(sizeToDistribute / (count - i), tempDefinitions[i].PreferredSize);
1614tempDefinitions[i].UpdateMinSize(Math.Min(newMinSize, tempDefinitions[i].SizeCache));
1625tempDefinitions[i].UpdateMinSize(Math.Min(newMinSize, tempDefinitions[i].SizeCache));
1736starValue = Math.Min(starValue, c_starClip);
1741maxSize = Math.Min(maxSize, c_starClip);
1780resolvedSize = Math.Min(userSize, tempDefinitions[i].UserMaxSize);
2086resolvedSize = Math.Min(resolvedSize, def.UserMaxSize);
2176starValue = Math.Min(starValue, c_starClip);
2181maxSize = Math.Min(maxSize, c_starClip);
2221definitions[i].SizeCache = Math.Max(definitions[i].MinSizeForArrange, Math.Min(userSize, userMaxSize));
2268resolvedSize = Math.Min(userSize, definitions[definitionIndices[i]].UserMaxSize);
2296final = Math.Min(final, definitions[definitionIndex].SizeCache);
2303final = Math.Min(final, definitions[definitionIndex].SizeCache);
2510def.SizeCache = Math.Max(def.MinSizeForArrange, Math.Min(userSize, userMaxSize));
2703resolvedSize = Math.Min(resolvedSize, def.UserMaxSize);
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (14)
2286double factor = Math.Min(1.0, isHorizontal ? viewport.Width / extendedViewport.Width : viewport.Height / extendedViewport.Height);
6595childViewport.X = Math.Min(childViewport.X, 0) -
6640childViewport.Y = Math.Min(childViewport.Y, 0) -
7098pixelSizeInViewport = Math.Min(childViewport.Width, childPixelSize.Width - pixelSizeBeforeViewport);
7153double childPixelHeightInViewport = Math.Min(childViewport.Height, childPixelSize.Height - Math.Max(childViewport.Y, 0.0));
7190pixelSizeInViewport = Math.Min(childViewport.Height, childPixelSize.Height - pixelSizeBeforeViewport);
7245double childPixelWidthInViewport = Math.Min(childViewport.Width, childPixelSize.Width - Math.Max(childViewport.X, 0.0));
9573Math.Min(stackPixelSize.Width, constraint.Width) : constraint.Width;
9578Math.Min(stackPixelSize.Height, constraint.Height) : constraint.Height;
10425Math.Min(stackPixelSize.Width, constraint.Width) : constraint.Width;
10430Math.Min(stackPixelSize.Height, constraint.Height) : constraint.Height;
10526lastPageSafeOffset = lastPageSafeOffset.HasValue ? Math.Min(computedViewportOffset.X, (double)lastPageSafeOffset) : computedViewportOffset.X;
10657lastPageSafeOffset = lastPageSafeOffset.HasValue ? Math.Min(computedViewportOffset.Y, (double)lastPageSafeOffset) : computedViewportOffset.Y;
11054targetRectSize = Math.Max(Math.Min(targetRectSize + targetRectOffset, minPhysicalOffset + viewportSize) - left, 0);
src\Framework\System\Windows\FrameworkElement.cs (19)
4065maxHeight = Math.Max(Math.Min(height, maxHeight), minHeight);
4068minHeight = Math.Max(Math.Min(maxHeight, height), minHeight);
4075maxWidth = Math.Max(Math.Min(width, maxWidth), minWidth);
4078minWidth = Math.Max(Math.Min(maxWidth, width), minWidth);
4201h = Math.Min(0.5*Math.Abs(xConstr/c), yCoverD);
4212w = Math.Min( 0.5*Math.Abs(yConstr/b), xCoverA);
4241h = Math.Min(0.5*Math.Abs(yConstr/d), xCoverC);
4252w = Math.Min( 0.5*Math.Abs(xConstr/a), yCoverB);
4269w = Math.Min(yCoverB, xCoverA) * 0.5;
4270h = Math.Min(xCoverC, yCoverD) * 0.5;
4287Double expandFactor = Math.Min(xConstr / childBoundsTr.Width,
4392frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth));
4393frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
4733Size clippedInkSize = new Size(Math.Min(innerInkSize.Width, mm.maxWidth),
4734Math.Min(innerInkSize.Height, mm.maxHeight));
4916inkSize.Width = Math.Min(inkSize.Width, mm.maxWidth);
4917inkSize.Height = Math.Min(inkSize.Height, mm.maxHeight);
5247inkSize.Width = Math.Min(inkSize.Width, mm.maxWidth);
5248inkSize.Height = Math.Min(inkSize.Height, mm.maxHeight);
src\Framework\System\Windows\Window.cs (8)
1877frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth));
1878frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight));
1907arrangeBounds.Width = Math.Max(mm.minWidth, Math.Min(arrangeBounds.Width, mm.maxWidth));
1908arrangeBounds.Height = Math.Max(mm.minHeight, Math.Min(arrangeBounds.Height, mm.maxHeight));
3554mm.maxWidth = Math.Min(MinWidth, maxSizeLogicalUnits.X);
3560mm.maxWidth = Math.Min(MaxWidth, maxSizeLogicalUnits.X);
3576mm.maxHeight = Math.Min(this.MinHeight, maxSizeLogicalUnits.Y);
3582mm.maxHeight = Math.Min(MaxHeight, maxSizeLogicalUnits.Y);