921 references to Max
mscorlib (23)
parent\parent\parent\parent\InternalApis\NDP_Common\inc\PinnableBufferCache.cs (2)
297m_restockSize = Math.Max(m_restockSize, m_minBufferCount - m_buffersUnderManagement); 391m_restockSize = Math.Max(newRestockSize, DefaultNumberOfBuffers);
system\Collections\Concurrent\ConcurrentDictionary.cs (2)
624m_budget = Math.Max(1, newTables.m_buckets.Length / newTables.m_locks.Length); 1924m_budget = Math.Max(1, newBuckets.Length / newLocks.Length);
system\collections\concurrent\PartitionerStatic.cs (1)
1717chunkSize = Math.Max(1, DEFAULT_BYTES_PER_CHUNK / Marshal.SizeOf(typeof(TSource)));
system\diagnostics\eventing\eventsource.cs (3)
3448string.Compare(eventName, taskName.Length, s_ActivityStartSuffix, 0, Math.Max(eventName.Length - taskName.Length, s_ActivityStartSuffix.Length)) == 0) 3469string.Compare(startEventMetadata.Name, taskName.Length, s_ActivityStartSuffix, 0, Math.Max(startEventMetadata.Name.Length - taskName.Length, s_ActivityStartSuffix.Length)) == 0) 3642EventMetadata[] newValues = new EventMetadata[Math.Max(eventData.Length + 16, eventAttribute.EventId + 1)];
System\Diagnostics\Eventing\TraceLogging\NameInfo.cs (1)
28newIdentity = Math.Max(newIdentity, snapshot); // Should be redundant. as we only create descriptors once.
system\rttype.cs (2)
601newSize = Math.Max(Math.Max(4, 2 * cachedMembers.Length), list.Length);
system\runtime\remoting\soapinteroptypes.cs (2)
249months = Math.Max(0, inDays - yearDays)/30; 251days = Math.Max(0, inDays - (yearDays+monthDays));
system\runtime\serialization\formatters\binary\binaryutilclasses.cs (4)
448int size = Math.Max(negObjects.Length * 2, (-index)+1); 455int size = Math.Max(objects.Length * 2, index+1); 538int size = Math.Max(negObjects.Length * 2, (-index)+1); 545int size = Math.Max(objects.Length * 2, index+1);
system\runtime\serialization\formatterservices.cs (1)
162RuntimeType[] tempParentTypes = new RuntimeType[Math.Max(parentTypeCount*2, 12)];
system\security\permissionset.cs (1)
1440int maxIndex = Math.Max( this.m_permSet.GetMaxUsedIndex(), other.m_permSet.GetMaxUsedIndex() );
system\security\util\tokenbasedset.cs (1)
204int iMax = Math.Max(m_maxIndex, index);
system\text\stringbuilder.cs (3)
1643int curInChunk = Math.Max(startIndexInChunk, 0); 1977int newBlockLength = Math.Max(minBlockCharCount, Math.Min(Length, MaxChunkSize)); 2056StringBuilder newChunk = new StringBuilder(Math.Max(count, DefaultCapacity), chunk.m_MaxCapacity, chunk.m_ChunkPrevious);
PresentationCore (38)
Core\CSharp\MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
1022int larger = Math.Max(lastChar, firstChar);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (3)
164uint ulAbsMaxDelDel = (uint)Math.Max(MathHelper.AbsNoThrow(minDelDel), MathHelper.AbsNoThrow(maxDelDel)); 166uint ulAbsMax = (uint)Math.Max(MathHelper.AbsNoThrow(minVal), MathHelper.AbsNoThrow(maxVal)); 297ulAbsMax = (uint)Math.Max(MathHelper.AbsNoThrow(minInt), MathHelper.AbsNoThrow(maxInt));
Core\CSharp\MS\Internal\TextFormatting\Bidi.cs (2)
1627lengthResolved = Math.Max(startOfNeutrals, startOfDelayed) == PositionInvalid ? 1630(Math.Max(startOfNeutrals, startOfDelayed)) :
Core\CSharp\MS\Internal\TextFormatting\FormatSettings.cs (2)
143_maxLineWidth = Math.Max(maxLineWidth, 0); 180formatWidth = Math.Max(formatWidth, 0);
Core\CSharp\MS\Internal\TextFormatting\LineServicesCallbacks.cs (4)
2147int expandedBy = Math.Max(0, interWordAdjustTo - adjustedCharWidth); 2154pplsAdjustRight[0][i] = Math.Max(0, adjustedCharWidth - interWordAdjustTo); 2289pplsCompressionRight[0][igi + i] = Math.Max(0, glyphAdvance - interWordCompressTo); 2431int expandedBy = Math.Max(0, interWordExpandTo - glyphAdvance);
Core\CSharp\MS\Internal\TextFormatting\SimpleTextLine.cs (2)
863int first = Math.Max(ich, dcp) + _cpFirst; 1235cpVisible = Math.Max(cpRunStart, cp);
Core\CSharp\MS\Internal\TextFormatting\TextFormatterImp.cs (2)
760value = Math.Max(value, 1); 781value = Math.Max(value, 1);
Core\CSharp\MS\Internal\TextFormatting\TextMetrics.cs (1)
191int lscpFirstIndependence = Math.Max(
Core\CSharp\MS\Internal\TextFormatting\TextStore.cs (8)
530int effectedRangeStart = Math.Max(cpFetched - offset, bounds[0].Position); 575currentPosition = Math.Max(currentPosition, bounds[i + 1].Position); 1981textTop = Math.Max(textTop, lsrun.BaselineOffset); 1982textBottom = Math.Max(textBottom, lsrun.Descent); 2002textBottom = Math.Max(textBottom, lsrun.Height + top); 2006textBottom = Math.Max(textBottom, lsrun.Height + textTop); 2070cellAscent = Math.Max(cellAscent, lsrun.BaselineOffset - move); 2071cellDescent = Math.Max(cellDescent, lsrun.Descent + move);
Core\CSharp\System\Windows\Markup\XmlLanguage.cs (1)
439specificity = Math.Max(GetSubtagCount(languageTag), 1 + GetSpecificity(culture.Parent, maxDepth - 1));
Core\CSharp\System\Windows\Media\Animation\ClockGroup.cs (1)
207desiredFrameRate = Math.Max(desiredFrameRate, currentDesiredFrameRate.Value);
Core\CSharp\System\Windows\Media\FamilyTypeface.cs (1)
323pAdvances[i] = Math.Max(0, (int)((metrics.BlackBoxWidth + metrics.LeftSideBearing + metrics.RightSideBearing) * emSize));
Core\CSharp\System\Windows\Media\FormattedText.cs (1)
1667int x0 = Math.Max(enumerator.Position, startIndex);
Core\CSharp\System\Windows\Media\GlyphsSerializer.cs (1)
75Math.Max(
Core\CSharp\System\Windows\Media\MatrixStack.cs (4)
88_highWaterMark = Math.Max(_highWaterMark, _size); 126_highWaterMark = Math.Max(_highWaterMark, _size); 156_highWaterMark = Math.Max(_highWaterMark, _size); 199int newSize = Math.Max(_highWaterMark, s_initialSize);
Core\CSharp\System\Windows\Media\MediaContext.cs (1)
789_animationRenderRate = Math.Max(_adjustedRefreshRate, _timeManager.GetMaxDesiredFrameRate());
Core\CSharp\System\Windows\Media\RenderData.cs (1)
491int newSize = Math.Max((_buffer.Length << 1) - (_buffer.Length >> 1), cbRequiredSize);
Core\CSharp\System\Windows\Media\TextFormatting\CharacterBufferReference.cs (1)
103int maxOffset = (charBuffer == null) ? 0 : Math.Max(0, charBuffer.Count - 1);
Core\CSharp\System\Windows\Media\VisualCollection.cs (1)
265InternalCapacity = Math.Max(min, (int)(InternalCapacity * c_growFactor));
PresentationFramework (130)
src\Framework\MS\Internal\Documents\ContentElementCollection.cs (1)
689PrivateCapacity = Math.Max(min, PrivateCapacity * 2);
src\Framework\MS\Internal\Documents\DocumentGrid.cs (1)
1481visiblePages.Add(_childrenCollection[_firstPageVisualIndex + j - Math.Max(0, firstPage)]);
src\Framework\MS\Internal\Documents\IFlowDocumentViewer.cs (1)
835GoToPage(Math.Max(1, MasterPageNumber - 2));
src\Framework\MS\Internal\Documents\RowCache.cs (2)
567_layoutColumns = Math.Max(1, _layoutColumns); 687pivotPage = Math.Max(0, PageCache.PageCount - columns);
src\Framework\MS\Internal\Documents\TextBoxView.cs (10)
709firstLineIndex = Math.Max(firstLineIndex, GetLineIndexFromOffset(startOffset, LogicalDirection.Forward)); 779int nextLineIndex = Math.Max(0, Math.Min(_lineMetrics.Count - 1, lineIndex + count)); 2045int startOffset = Math.Max(_lineMetrics[lineIndex].Offset, unclippedStartOffset); 2141int startOffset = Math.Max(lineStartOffset, unclippedStartOffset); 2204firstLineIndex = Math.Max(0, Math.Min(firstLineIndex, _lineMetrics.Count - 1)); 2205lastLineIndex = Math.Max(0, Math.Min(lastLineIndex, _lineMetrics.Count - 1)); 2551int lastCoveredCharOffset = range.StartIndex + Math.Max(range.PositionsAdded, range.PositionsRemoved); 2710int lineIndex = Math.Max(oldLineVisualsIndex, firstLineIndex); 2805count = Math.Max(0, count); 2970int rangeStart = Math.Max(viewportStart, selectionStart);
src\Framework\MS\Internal\Documents\TextContainerHelper.cs (3)
208_cpLast = Math.Max(_cpLast, cpLast); 233_ranges[i * 2 + 1] = Math.Max(_ranges[i * 2 + 1], cpLast); 255_ranges[pos * 2 + 1] = Math.Max(_ranges[pos * 2 + 1], _ranges[(pos + 1) * 2 + 1]);
src\Framework\MS\Internal\Documents\TextParagraphView.cs (2)
186lineIndex = Math.Max(0, lineIndex + count); 603lineIndex = Math.Max(Math.Min((int)(point.Y / approximatedLineHeight), lines.Count - 1), 0);
src\Framework\MS\Internal\PtsHost\ContainerParaClient.cs (2)
77_rect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du); 78_rect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv);
src\Framework\MS\Internal\PtsHost\ContainerParagraph.cs (8)
540fsrcToFillSubtrack.u = Math.Max(Math.Min(fsrcToFillSubtrack.u, fsrcToFill.u + fsrcToFill.du - 1), fsrcToFill.u); 541fsrcToFillSubtrack.du = Math.Max(fsrcToFillSubtrack.du, 0); 554fsrcToFillSubtrack.v = Math.Max(Math.Min(fsrcToFillSubtrack.v, fsrcToFill.v + fsrcToFill.dv - 1), fsrcToFill.v); 555fsrcToFillSubtrack.dv = Math.Max(fsrcToFillSubtrack.dv, 0); 705urSubtrack = Math.Max(Math.Min(urTrack + mbp.MBPLeft, urTrack + durTrack - 1), urTrack); 706durSubtrack = Math.Max(durTrack - (mbp.MBPLeft + mbp.MBPRight), 0); 842urSubtrack = Math.Max(Math.Min(urTrack + mbp.MBPLeft, urTrack + durTrack - 1), urTrack); 843durSubtrack = Math.Max(durTrack - (mbp.MBPLeft + mbp.MBPRight), 0);
src\Framework\MS\Internal\PtsHost\FigureParaClient.cs (4)
104_contentRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BPRight - mbp.BPLeft); 106_contentRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BPBottom - mbp.BPTop); 109_paddingRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BorderRight - mbp.BorderLeft); 111_paddingRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BorderBottom - mbp.BorderTop);
src\Framework\MS\Internal\PtsHost\FigureParagraph.cs (2)
171int subpageWidth = Math.Max(1, TextDpi.ToTextDpi(anchorLimitedWidth) - (mbp.BPLeft + mbp.BPRight)); 180int subpageHeight = Math.Max(1, TextDpi.ToTextDpi(anchorLimitedHeight) - (mbp.BPTop + mbp.BPBottom));
src\Framework\MS\Internal\PtsHost\FloaterParaClient.cs (4)
230_contentRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BPRight - mbp.BPLeft); 232_contentRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BPBottom - mbp.BPTop); 235_paddingRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BorderRight - mbp.BorderLeft); 237_paddingRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BorderBottom - mbp.BorderTop);
src\Framework\MS\Internal\PtsHost\FloaterParagraph.cs (4)
243subpageHeight = Math.Max(1, dvrAvailable - (mbp.MBPTop + mbp.MBPBottom)); 683subpageWidth = Math.Max(1, durSpecified - (mbp.BPLeft + mbp.BPRight)); 688subpageWidth = Math.Max(1, durAvailable - (mbp.MBPLeft + mbp.MBPRight)); 694subpageWidth = Math.Max(1, durAvailable - (mbp.MBPLeft + mbp.MBPRight));
src\Framework\MS\Internal\PtsHost\Line.cs (1)
113dvrSuppressible = Math.Max(0, TextDpi.ToTextDpi(_line.OverhangAfter));
src\Framework\MS\Internal\PtsHost\MarginCollapsingState.cs (1)
170_maxPositive = Math.Max(_maxPositive, mcs._maxPositive);
src\Framework\MS\Internal\PtsHost\PtsHelper.cs (5)
939return Math.Max(1, Math.Min(PTS.Restrictions.tscColumnRestriction-1, columns)); // at least 1 column is required 1033pfscolinfo[i].durBefore = Math.Max(0, pfscolinfo[i].durBefore); 1034pfscolinfo[i].durWidth = Math.Max(1, pfscolinfo[i].durWidth); 1065pfscolinfo[i].durBefore = Math.Max(0, pfscolinfo[i].durBefore); 1066pfscolinfo[i].durWidth = Math.Max(1, pfscolinfo[i].durWidth);
src\Framework\MS\Internal\PtsHost\PtsPage.cs (1)
850rect.dv = Math.Max(rect.dv, bbox.fsrc.dv);
src\Framework\MS\Internal\PtsHost\SubpageParaClient.cs (4)
116_contentRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BPRight - mbp.BPLeft); 118_contentRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BPBottom - mbp.BPTop); 121_paddingRect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du - mbp.BorderRight - mbp.BorderLeft); 123_paddingRect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv - mbp.BorderBottom - mbp.BorderTop);
src\Framework\MS\Internal\PtsHost\SubpageParagraph.cs (16)
195subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight)); 204subpageHeight = Math.Max(1, subpageHeight - (marginTop + mbp.BPTop)); 258dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v); 259fsrcToFill.du = Math.Max(fsrcToFill.du, fsbbox.fsrc.du + fsbbox.fsrc.u); 302fsbbox.fsrc.du = Math.Max(fsrcToFill.du - (mbp.MarginLeft + mbp.MarginRight), 0); 303fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0); 394subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight)); 466dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v); 467durTrack = Math.Max(durTrack, fsbbox.fsrc.du + fsbbox.fsrc.u); 477fsbbox.fsrc.du = Math.Max(durTrack - (mbp.MarginLeft + mbp.MarginRight), 0); 478fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0); 563subpageWidth = Math.Max(1, subpageWidth - (mbp.MBPLeft + mbp.MBPRight)); 634dvrUsed = Math.Max(dvrUsed, fsbbox.fsrc.dv + fsbbox.fsrc.v); 635durTrack = Math.Max(durTrack, fsbbox.fsrc.du + fsbbox.fsrc.u); 645fsbbox.fsrc.du = Math.Max(durTrack - (mbp.MarginLeft + mbp.MarginRight), 0); 646fsbbox.fsrc.dv = Math.Max(dvrUsed - dvrTopSpace, 0);
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (2)
2547Math.Max(_rect.du - (mbpInfo.BPRight + mbpInfo.BPLeft), 1), 2548Math.Max(_rect.dv - calculatedBPBottom - calculatedBPTop, 1)
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (9)
854int dcpStart = Math.Max(cpStartTextPointer, cpParagraphStart) - cpParagraphStart; 1597int countVisualsShiftBeforeChange = Math.Min(Math.Max(lineIndexToBeginRemoval - _lineIndexFirstVisual, 0), lineVisuals.Count); 1614int actualLinesToRemove = Math.Min(Math.Max(lineIndexToBeginRemoval - _lineIndexFirstVisual + cLinesToRemove, 0), lineVisuals.Count); 2088int dcpRangeStartForThisLine = Math.Max(lineDesc.dcpFirst, dcpStart); 2091int cchRangeForThisLine = Math.Max(Math.Min(lineDesc.dcpLim, dcpEnd) - dcpRangeStartForThisLine, 1); 2203int dcpRangeStartForThisElem = Math.Max(elemDesc.dcpFirst, dcpStart); 2206int cchRangeForThisElem = Math.Max(Math.Min(elemDesc.dcpLim, dcpEnd) - dcpRangeStartForThisElem, 1); 3381line.GetGlyphRuns(glyphRuns, Math.Max(dcpStart, lineDesc.dcpFirst), Math.Min(dcpEnd, lineDesc.dcpLim)); 3448line.GetGlyphRuns(glyphRuns, Math.Max(dcpStart, element.dcpFirst), Math.Min(dcpEnd, element.dcpLim));
src\Framework\MS\Internal\PtsHost\UIElementParaClient.cs (2)
87_rect.du = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.du); 88_rect.dv = Math.Max(TextDpi.ToTextDpi(TextDpi.MinWidth), _rect.dv);
src\Framework\MS\Internal\PtsHost\UIElementParagraph.cs (1)
389double elementWidth = TextDpi.FromTextDpi(Math.Max(1, durAvailable - (mbp.MBPLeft + mbp.MBPRight)));
src\Framework\System\Windows\Controls\DataGrid.cs (5)
5738nextDisplayIndex = Math.Max(0, InternalColumns.LastVisibleDisplayIndex); 5819nextRowIndex = Math.Max(0, Items.Count - 1); 6004index = Math.Max(0, Math.Min(numItems - 1, index + (shiftModifier ? -1 : 1))); 6147int jumpDistance = Math.Max(1, (int)scrollHost.ViewportHeight - 1); 6149targetIndex = Math.Max(0, Math.Min(targetIndex, Items.Count - 1));
src\Framework\System\Windows\Controls\Grid.cs (5)
2936Array.Clear(extData.TempDefinitions, 0, Math.Max(DefinitionsU.Length, DefinitionsV.Length)); 3141int requiredLength = Math.Max(DefinitionsU.Length, DefinitionsV.Length) * 2; 3174int requiredLength = Math.Max(Math.Max(DefinitionsU.Length, DefinitionsV.Length), 1) * 2; 3192int requiredLength = Math.Max(DefinitionsU.Length, DefinitionsV.Length);
src\Framework\System\Windows\Controls\Primitives\Popup.cs (2)
2717return new Rect(mousePoint.x, mousePoint.y - 1, Math.Max(0, cursorWidth - hotX), Math.Max(0, cursorHeight - hotY + 2));
src\Framework\System\Windows\Controls\PrintDialog.cs (1)
366Math.Max((int)dlg.MinPage, _pageRange.PageFrom),
src\Framework\System\Windows\Controls\Stack.cs (1)
1007iNewOffset = Math.Max(Math.Min(numberOfItems - 1, iNewOffset), 0);
src\Framework\System\Windows\Controls\TextBlock.cs (1)
2419int dcpStart = Math.Max(dcpLineStart, dcpPositionStart);
src\Framework\System\Windows\Controls\VirtualizedCellInfoCollection.cs (6)
616int left = Math.Max(Left, region.Left); 617int top = Math.Max(Top, region.Top); 691Right = Math.Max(prevRight, region.Right); 692Bottom = Math.Max(prevBottom, region.Bottom); 732int top = Math.Max(Top, region.Top); 740int top = Math.Max(Top, region.Top);
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (6)
2288excludeCount = Math.Max(excludeCount, 2637_firstItemInExtendedViewportIndex = Math.Max(_firstItemInExtendedViewportIndex - 1, 0); 2639_firstItemInExtendedViewportChildIndex = Math.Max(_firstItemInExtendedViewportChildIndex, 0); 4867itemsInExtendedViewportCount = Math.Max(calcItemsInExtendedViewportCount, itemsInExtendedViewportCount); 9390return Math.Max(0, _firstItemInExtendedViewportIndex); 11101else if (childIndex > firstChildInView + Math.Max(viewportSize - 1, 0))
src\Framework\System\Windows\Documents\FixedPageStructure.cs (1)
142line = Math.Max(0, Math.Min(line, _lineResults.Length - 1));
src\Framework\System\Windows\Documents\Glyphs.cs (1)
552estimatedNumberOfGlyphs = Math.Max(estimatedNumberOfGlyphs, glyphsProp.Length / 5);
src\Framework\System\Windows\Documents\RangeContentEnumerator.cs (1)
316newBuffer = new char[Math.Max(2*_buffer.Length, size)];
src\Framework\System\Windows\Documents\Speller.cs (2)
1261sTextRange = (SpellerInteropBase.ITextRange)segments[Math.Max(i, 0)]; 1272contextOffset = Math.Max(sTextRange.Start + sTextRange.Length, contentOffset);
src\Framework\System\Windows\Documents\TableRowGroup.cs (1)
237_columnCount = Math.Max(_columnCount, Rows[i].ColumnCount);
src\Framework\System\Windows\Documents\TextContainerChangedEventArgs.cs (2)
244change.RemovedLength += Math.Max(0, length - change.AddedLength); 245change.AddedLength = Math.Max(0, change.AddedLength - length);
src\Framework\System\windows\Documents\TextEditor.cs (2)
539_mouseSelectionState.Timer.Interval = TimeSpan.FromMilliseconds(Math.Max(SystemParameters.MenuShowDelay, 200)); 1218int extraCharsAllowed = Math.Max(0, this.MaxLength - currentLength);
src\Framework\System\Windows\Documents\TextFindEngine.cs (1)
221int textBlockLength = Math.Max(TextBlockLength, findPattern.Length * 2 * 2);
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (2)
339int lastRowIndex = Math.Max(anchorCell.Row.Index + anchorCell.RowSpan - 1, movingCell.Row.Index + movingCell.RowSpan - 1); 341int lastColumnIndex = Math.Max(anchorCell.ColumnIndex + anchorCell.ColumnSpan - 1, movingCell.ColumnIndex + movingCell.ColumnSpan - 1);
src\Framework\System\Windows\Documents\TextStore.cs (1)
3693int extraCharsAllowed = Math.Max(0, this.TextEditor.MaxLength - currentLength);
src\Framework\System\Windows\Markup\BamlRecordReader.cs (1)
1782defKeyList = new ArrayList(Math.Max (5, (int)(bamlRecord.ContentSize/400)));
src\Framework\System\Windows\Standard\NativeMethods.cs (2)
2148Right = Math.Max(rect1.Right, rect2.Right), 2149Bottom = Math.Max(rect1.Bottom, rect2.Bottom),
System (7)
compmod\system\componentmodel\EventDescriptorCollection.cs (1)
207int newSize = Math.Max(sizeNeeded, events.Length * 2);
compmod\system\componentmodel\PropertyDescriptorCollection.cs (1)
231int newSize = Math.Max(sizeNeeded, properties.Length * 2);
net\System\Net\WebSockets\WebSocketBuffer.cs (1)
598return Math.Max(m_ReceiveBufferSize, m_SendBufferSize);
parent\parent\parent\InternalApis\NDP_Common\inc\PinnableBufferCache.cs (2)
297m_restockSize = Math.Max(m_restockSize, m_minBufferCount - m_buffersUnderManagement); 391m_restockSize = Math.Max(newRestockSize, DefaultNumberOfBuffers);
services\monitoring\system\diagnosticts\EventLog.cs (1)
1258largestNumber = Math.Max(largestNumber, num);
sys\system\io\ports\SerialPort.cs (1)
1476int newLength = Math.Max(CachedBytesToRead + additionalByteLength, inBuffer.Length * 2);
System.Activities.DurableInstancing (1)
System\Activities\DurableInstancing\BinaryHeap.cs (1)
142int newSize = Math.Max(
System.Activities.Presentation (1)
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (1)
210int index = Math.Max(0, Math.Min(numItems - 1, items.IndexOf(currentCell.Item) + (shiftModifier ? -1 : 1)));
System.Configuration (1)
System\Configuration\ConfigurationErrorsException.cs (1)
238_firstLine = Math.Max(line, 0); // BaseConfigurationRecord uses -1 as uninitialized value.
System.Core (5)
Microsoft\Scripting\Ast\DebugViewWriter.cs (1)
208return (Flow)System.Math.Max((int)last, (int)flow);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (1)
380return Math.Max(m_childCount - m_takeOrSkipOp.m_count, 0);
System\Linq\Parallel\Scheduling\Scheduling.cs (1)
90chunkSize = Math.Max(1, DEFAULT_BYTES_PER_CHUNK / Marshal.SizeOf(typeof(T)));
System\Security\Cryptography\Rfc4050KeyFormatter.cs (2)
211int requiredLength = Math.Max(xLen, yLen); 221requiredLength = Math.Max(requiredLength, curveLength);
System.Data (33)
fx\src\data\Microsoft\SqlServer\Server\SqlRecordBuffer.cs (2)
433byte[] data = new byte[Math.Max(ndataIndex + length, 2 * cbytes)]; 470char[] data = new char[Math.Max(ndataIndex + length, 2 * cchars)];
fx\src\data\System\Data\Common\DBCommandBuilder.cs (1)
210int maxPrefixLength = Math.Max(
fx\src\data\System\Data\Common\Int32Storage.cs (1)
115max=Math.Max(values[record], max);
fx\src\data\System\Data\DataColumn.cs (1)
956maxLength = Math.Max(value, -1);
fx\src\data\System\Data\Filter\BinaryNode.cs (2)
1040DataTypePrecedence higherPrec = (DataTypePrecedence)Math.Max(leftPrecedence, rightPrecedence); 1138DataTypePrecedence higherPrec = (DataTypePrecedence)Math.Max(leftPrecedence, rightPrecedence);
fx\src\data\System\Data\Odbc\OdbcParameter.cs (5)
322cch = Math.Max(cch, 4 * 1024); // MDAC 69224 345cch = Math.Max(cch, 4 * 1024); // MDAC 69224 359cch = Math.Max(cch, 8 * 1024); // MDAC 69224 370cch = Math.Max(2, cch); 452ccb = Math.Max(ccb, 8 * 1024); // MDAC 69224
fx\src\data\System\Data\Odbc\OdbcUtils.cs (2)
171length = Math.Max(0, ((string)value).Length - valueOffset); 184length = Math.Max(0, ((char[])value).Length - valueOffset);
fx\src\data\System\Data\OleDb\ColumnBinding.cs (3)
169return Math.Max(length, 0); 223_valueBindingOffset = Math.Max(offset, 0); 227_valueBindingSize = Math.Max(size, 0);
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (1)
1574_rowFetchedCount = (IntPtr)Math.Max((int)_rowFetchedCount, 0);
fx\src\data\System\Data\OleDb\RowBinding.cs (1)
160return Math.Max(8, (value + 7) & ~0x7); // MDAC 70350
fx\src\data\System\Data\ProviderBase\DbMetaDataFactory.cs (1)
146command.CommandTimeout = System.Math.Max(command.CommandTimeout,180);
fx\src\data\System\Data\SqlClient\SqlCommand.cs (2)
5022? (_rowsAffected - Math.Max(_sqlRPCParameterEncryptionReqArray[_currentlyExecutingDescribeParameterEncryptionRPC - 1].cumulativeRecordsAffected, 0)) 5060? (_rowsAffected - Math.Max(_SqlRPCBatchArray[_currentlyExecutingBatch-1].cumulativeRecordsAffected, 0))
fx\src\data\System\Data\SqlClient\SqlCommandSet.cs (2)
164byte[] copy = new byte[Math.Max(countOfBytes, 0)]; 178char[] copy = new char[Math.Max(countOfChars, 0)];
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (2)
3894throw ADP.NonSequentialColumnAccess(columnIndex, Math.Max(_sharedState._nextColumnHeaderToRead - 1, _lastColumnWithDataChunkRead)); 3916throw ADP.NonSequentialColumnAccess(columnIndex, Math.Max(_sharedState._nextColumnDataToRead, _lastColumnWithDataChunkRead + 1));
fx\src\data\System\Data\SQLTypes\SQLDecimal.cs (7)
1222ResInteger = Math.Max((int)x.m_bPrec - MyScale, (int)y.m_bPrec - OpScale); 1226ResScale = Math.Max(MyScale, OpScale); 1435ResScale = Math.Max(ResScale, Math.Min(ActualScale,x_cNumeDivScaleMin)); 1649ResScale = Math.Max(x.m_bScale + y.m_bPrec + 1, x_cNumeDivScaleMin); 1662ResScale = Math.Max(ResScale, MinScale); 2236bNewPrec = (byte) (Math.Min(NUMERIC_MAX_PRECISION,Math.Max(1,lAdjust + m_bPrec))); 3065lPosition = Math.Max(-NUMERIC_MAX_PRECISION, lPosition);
System.Data.Entity (9)
System\Data\Common\Internal\Materialization\Coordinator.cs (1)
125maxDistance = Math.Max(maxDistance, child.MaxDistanceToLeaf() + 1);
System\Data\Common\Internal\Materialization\RecordState.cs (2)
159return Math.Max(0, byteCount); 194return Math.Max(0, charCount);
System\Data\Common\Utils\AliasGenerator.cs (1)
92_counter = Math.Max(unchecked(1+_counter), 0);
System\Data\Mapping\MetadataMappingHasherVisitor.HashSourceBuilder.cs (1)
154int bufferSize = Math.Max(_cachedBuffer.Length + (_cachedBuffer.Length / 2), byteCount);
System\Data\Mapping\ViewGeneration\QueryRewriting\RewritingProcessor.cs (1)
253int numPermutations = Math.Min(MAX_PERMUTATIONS, Math.Max(MIN_PERMUTATIONS, (int)(usedViews.Count * PERMUTE_FRACTION)));
System\Data\Metadata\EdmSchemaError.cs (1)
242int pos = Math.Max(schemaLocation.LastIndexOf('/'), schemaLocation.LastIndexOf('\\'));
System\Data\Objects\ObjectContext.cs (1)
2580int returnTypeCount = Math.Max(1, functionImport.ReturnParameters.Count);
System\Data\SqlClient\SqlProviderServices.cs (1)
367result.Size = Math.Max(result.Size, size.Value);
System.Data.Linq (2)
SqlClient\SqlTypeSystemProvider.cs (2)
1349int bestLeft = Math.Max(p0 - s0, p1 - s1); 1350int bestRight = Math.Max(s0, s1);
System.Data.Services.Client (1)
System\Data\Services\Client\ArraySet.cs (1)
72Array.Resize<T>(ref this.items, Math.Min(Math.Max(index, 16), Int32.MaxValue / 2) * 2);
System.Data.SqlXml (2)
System\Xml\Xsl\Runtime\XslNumber.cs (1)
271int newLen = Math.Max(oldLen, minLen);
System\Xml\Xsl\Runtime\XsltLibrary.cs (1)
446idx += Math.Max(count - 4, 0);
System.Drawing (6)
commonui\System\Drawing\BufferedGraphicsContext.cs (2)
386int optWidth = Math.Max(width, bufferSize.Width); 387int optHeight = Math.Max(height, bufferSize.Height);
commonui\System\Drawing\Rectangle.cs (4)
439int x1 = Math.Max(a.X, b.X); 441int y1 = Math.Max(a.Y, b.Y); 474int x2 = Math.Max(a.X + a.Width, b.X + b.Width); 476int y2 = Math.Max(a.Y + a.Height, b.Y + b.Height);
System.Numerics (4)
System\Numerics\BigInteger.cs (3)
1340uint[] z = new uint[Math.Max(x.Length, y.Length)]; 1360uint[] z = new uint[Math.Max(x.Length, y.Length)]; 1375uint[] z = new uint[Math.Max(x.Length, y.Length)];
System\Numerics\BigIntegerBuilder.cs (1)
429EnsureWritable(Math.Max(_iuLast, reg._iuLast) + 1, 1);
System.Runtime.Caching (5)
System\Caching\MemoryCacheStatistics.cs (2)
96return Math.Max(_physicalMemoryMonitor.GetPercentToTrim(_lastTrimTime, _lastTrimPercent), _cacheMemoryMonitor.GetPercentToTrim(_lastTrimTime, _lastTrimPercent)); 219int percent = Math.Max(minPercent, GetPercentToTrim());
System\Caching\PhysicalMemoryMonitor.cs (3)
134percent = Math.Max(MIN_TOTAL_MEMORY_TRIM_PERCENT, percent); 153_pressureHigh = Math.Max(3, physicalMemoryLimitPercentage); 154_pressureLow = Math.Max(1, _pressureHigh - 9);
System.Runtime.Serialization (14)
System\Xml\XmlBinaryReader.cs (5)
894int maxLength = Math.Max(this.maxBytesPerRead - maxTextNodeLength, 0); 906int actual = Math.Max(maxLength - maxTextNodeLength, 0); 964int maxLength = Math.Max(this.maxBytesPerRead - maxTextNodeLength, 0); 976int actual = Math.Max(maxLength - maxTextNodeLength, 0); 1006int maxBytesPerRead = Math.Max(this.maxBytesPerRead - nodeLength, 0);
System\Xml\XmlBinaryReaderSession.cs (2)
45strings = new XmlDictionaryString[Math.Max(id + 1, 16)]; 49XmlDictionaryString[] newStrings = new XmlDictionaryString[Math.Min(Math.Max(id + 1, strings.Length * 2), MaxArrayEntries)];
System\Xml\XmlBinaryWriterSession.cs (2)
63IntArray keys = new IntArray(Math.Max(minCount, 16)); 250int[] newArray = new int[Math.Max(index + 1, array.Length * 2)];
System\Xml\XmlBufferReader.cs (2)
222byte[] newBuffer = new byte[Math.Max(newOffsetMax, buffer.Length * 2)]; 284this.windowOffsetMax = Math.Max(windowOffset + windowLength, offsetMax);
System\Xml\XmlC14NWriter.cs (2)
362xmlnsBuffer = new byte[Math.Max(byteCount, 128)]; 366byte[] newBuffer = new byte[Math.Max(xmlnsOffset + byteCount, xmlnsBuffer.Length * 2)];
System\Xml\XmlMtomReader.cs (1)
1299this.stringOffset = Math.Max(0, this.stringOffset - consumed * 2);
System.ServiceModel (13)
System\ServiceModel\Channels\TransmissionStrategy.cs (5)
359this.slowStartThreshold = Math.Max(1, this.windowSize >> 1); 737this.quotaRemaining = quotaRemaining - Math.Max(0, inFlightAfterAck); 753sendBeginIndex = Math.Max(0, (int)oldWindowEnd - (int)this.windowStart); 760int segmentSize = Math.Max(1, (this.lossWindowSize - this.slowStartThreshold) / 8); 769sendBeginIndex = Math.Max(0, (int)oldWindowEnd - (int)this.windowStart);
System\ServiceModel\Channels\WebSocketHelper.cs (1)
73return Math.Max(WebSocketDefaults.MinReceiveBufferSize, effectiveMaxReceiveBufferSize);
System\ServiceModel\Dispatcher\ClientRuntime.cs (1)
333max = System.Math.Max(max, this.operations[i].ParameterInspectors.Count);
System\ServiceModel\Dispatcher\DispatchRuntime.cs (4)
671max = System.Math.Max(max, this.operations[i].CallContextInitializers.Count); 673max = System.Math.Max(max, this.unhandled.CallContextInitializers.Count); 689max = System.Math.Max(max, this.operations[i].ParameterInspectors.Count); 691max = System.Math.Max(max, this.unhandled.ParameterInspectors.Count);
System\ServiceModel\Security\SendSecurityHeader.cs (1)
407int keyLength = Math.Max(128, this.AlgorithmSuite.DefaultSymmetricKeyLength);
System\ServiceModel\Security\SymmetricSecurityProtocol.cs (1)
240int keyLength = Math.Max(128, this.Factory.OutgoingAlgorithmSuite.DefaultSymmetricKeyLength);
System.ServiceModel.Channels (2)
System\ServiceModel\UdpBinding.cs (2)
53this.MaxRetransmitCount = Math.Max(transport.RetransmissionSettings.MaxUnicastRetransmitCount, transport.RetransmissionSettings.MaxMulticastRetransmitCount); 92return Math.Max(this.udpTransport.RetransmissionSettings.MaxUnicastRetransmitCount, this.udpTransport.RetransmissionSettings.MaxMulticastRetransmitCount);
System.Web (15)
Cache\SqlCacheDependency.cs (2)
798timeout = Math.Max(context.Timeout.Seconds / 3, 30); 1018timeout = Math.Max(context.Timeout.Seconds / 3, 30);
Management\AppDomainResourcePerfCounters.cs (1)
124_CPUUsageLastReported = Math.Min(100, Math.Max(0, cpuPercent)); // Make sure it's within 0 and 100
Management\WebEvents.cs (2)
1065set { _level = Math.Max(value, 0); } 1070set { _tabSize = Math.Max(value, 0); }
UI\WebControls\CreateUserWizard.cs (1)
2113int length = Math.Max(10, Membership.MinRequiredPasswordLength);
UI\WebControls\DataGrid.cs (1)
1371firstPage = Math.Max(1, lastPage - pageSetSize + 1);
UI\WebControls\DetailsView.cs (1)
1986firstPage = Math.Max(1, lastPage - pageSetSize + 1);
UI\WebControls\FormView.cs (1)
1686firstPage = Math.Max(1, lastPage - pageSetSize + 1);
UI\WebControls\GridView.cs (3)
2548firstPage = Math.Max(1, lastPage - pageSetSize + 1); 2921int expectedRowCount = Math.Max(0, rowCount - affectedRows); 2929expectedPageCount = Math.Max(1, (expectedRowCount + PageSize - 1) / PageSize);
UI\WebControls\MenuRendererStandards.cs (1)
193lastIndex = Math.Max(lastIndex, Menu._levelMenuItemStyles.Count);
Util\ReadWriteSpinLock.cs (2)
264baseSpins = Math.Max(baseSpins, LOCK_MINIMUM_SPINS); 324baseSpins = Math.Max(baseSpins, LOCK_MINIMUM_SPINS); //= max(baseSpins, LOCK_MINIMUM_SPINS);
System.Web.DataVisualization (26)
Common\ChartTypes\PieChart.cs (1)
5240 numOfItems = Math.Max( numOfItems, maxNumOfRows );
Common\ChartTypes\RadarChart.cs (1)
303 sectorNumber = (int)Math.Max(series.Points.Count, sectorNumber);
Common\DataManager\DataManager.cs (1)
303 numberOfPoints = Math.Max(numberOfPoints, this._series[seriesName].Points.Count);
Common\General\Axis.cs (3)
3719 size = (float)Math.Max(this.LabelAutoFitMaxFontSize, this.LabelAutoFitMinFontSize); 4765 Math.Max(this.LabelAutoFitMaxFontSize, this.LabelAutoFitMinFontSize), 5891groupLabelLevel = Math.Max(groupLabelLevel, label.RowIndex);
Common\General\AxisLabels.cs (1)
807maxPointCount = Math.Max(maxPointCount, ser.Points.Count);
Common\General\AxisScaleBreaks.cs (1)
967numberOfPoints = Math.Max(numberOfPoints, series.Points.Count);
Common\General\Chart.cs (4)
320image = new Bitmap(Math.Max(1,Width), Math.Max(1,Height)); 1623Bitmap image = new Bitmap(Math.Max(1,Width), Math.Max(1,Height));
Common\General\ChartGraphics3D.cs (2)
2500 leftPoint = ChartGraphics.FindPointByIndex(points, Math.Max(firstPoint.index, secondPoint.index) + 1, (multiSeries) ? secondPoint : null, ref pointArrayIndex); 2551 rightPoint = ChartGraphics.FindPointByIndex(points, Math.Max(firstPoint.index, secondPoint.index) + 1, (multiSeries) ? secondPoint : null, ref pointArrayIndex);
Common\General\DataManipulator.cs (1)
3020 numberOfYValues = (int)Math.Max(numberOfYValues, series.YValuesPerPoint);
Common\General\Legend.cs (11)
502 highestHeader.Height = Math.Max(highestHeader.Height, headerSize.Height); 515 this._headerPosition.Height = Math.Max(this._headerPosition.Height, 0); 952 highestHeader.Height = Math.Max(highestHeader.Height, headerSize.Height); 1035 optimalSize.Width = Math.Max(optimalSize.Width, titleSize.Width); 1398 maxColumnHeight = Math.Max(maxColumnHeight, columnHeight); 1680 maxNumberOfColumns = Math.Max(maxNumberOfColumns, rowsPerColumn[columnIndex]); 1813 Math.Max(cellHeights[currentColumn, currentRow], cellSize.Height); 1869 width = Math.Max(width, cellWidth ); 1979 width = Math.Max(width, subColumnSizes[currentColumn, currentSubColumn]); 2019 totalHeight = Math.Max(totalHeight, columnHeight); 2056 this._numberOfCells = Math.Max(this._numberOfCells, legendItem.Cells.Count);
System.Web.Mobile (4)
UI\MobileControls\Form.cs (2)
529int page = Math.Max(Math.Min(_currentPage, _pageCount), 1); 611this.LastPage = Math.Max(pager.PageCount, 1);
UI\MobileControls\ItemPager.cs (2)
67pager.RemainingWeight = Math.Max(0, pager.PageWeight - _lastPageItemCount * itemWeight); 84_fullPageItemCount = Math.Max(1, pager.PageWeight / itemWeight);
System.Windows.Forms (349)
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (10)
985return Math.Max(checkSize, imageSize + textSize); 987return Math.Max(imageSize, textSize) + checkSize; 989return Math.Max(Math.Max(checkSize, imageSize), textSize); 1375layout.textBounds.Y = Math.Max(Math.Min(layout.textBounds.Y, layout.field.Y + (layout.field.Height - layout.textBounds.Height)/2), layout.field.Y); 1381layout.textBounds.X = Math.Max(Math.Min(layout.textBounds.X, layout.field.X + (layout.field.Width - layout.textBounds.Width)/2), layout.field.X); 1386layout.imageBounds.Width = Math.Max(0, Math.Min(maxBounds.Width - layout.textBounds.Width, layout.imageBounds.Width)); 1391layout.imageBounds.Height = Math.Max(0, Math.Min(maxBounds.Height - layout.textBounds.Height, layout.imageBounds.Height)); 1422layout.textBounds.Y = Math.Max(layout.textBounds.Y, maxBounds.Y); 1428layout.textBounds.Y = Math.Max(layout.textBounds.Y, layout.field.Y);
winforms\Managed\System\WinForms\CheckBox.cs (1)
381size.Height = DpiHelper.EnableDpiChangedHighDpiImprovements ? Math.Max(size.Height + 5, flatSystemStyleMinimumHeight) : size.Height + 5; // ensure minimum height to avoid truncation of check-box or text
winforms\Managed\System\WinForms\CheckedListBox.cs (1)
687int centeringFactor = Math.Max((height - idealCheckSize) / 2, 0);
winforms\Managed\System\WinForms\ColumnHeader.cs (1)
137int hiDI = Math.Max(this.DisplayIndexInternal, value);
winforms\Managed\System\WinForms\ComboBox.cs (1)
3372int count = Math.Min(Math.Max(itemCount, 1), maxDropDownItems);
winforms\Managed\System\WinForms\ControlPaint.cs (2)
2825max = Math.Max( Math.Max(r,g), b);
winforms\Managed\System\WinForms\DataGrid.cs (23)
1402vertScrollBar.Maximum = Math.Max(0, DataGridRowsLength - 1); 1689this.RowHeaderWidth = Math.Max(this.minRowHeaderWidth, this.RowHeaderWidth); 1691this.myGridTable.RowHeaderWidth = Math.Max(this.minRowHeaderWidth, this.RowHeaderWidth); 2913value = Math.Max(this.minRowHeaderWidth, value); 4126int upperRow = Math.Max(lastRowSelected, location.row); 4271int upperRow = Math.Max(lastRowSelected, rowOver); 4386newRow = Math.Max(0, Math.Min(newRow, DataGridRowsLength - numTotallyVisibleRows)); 4705r.Y = Math.Max(r.Y , 0); 4713r.X = Math.Max(r.X , 0); 4932int x = rightToLeft ? Math.Max(e.X, layout.Data.X) : Math.Min(e.X, layout.Data.Right + 1); 4939proposed = Math.Max(proposed, 3); 5063resizeHeight = Math.Max(resizeHeight, columns[col].GetPreferredHeight(g, value)); 5140proposed = Math.Max(proposed, 3); 6272nExpandableRows = Math.Max(nExpandableRows-1,0); 6749int totalWidth = Math.Max(0, GetColumnWidthSum()); 6823horizScrollBar.LargeChange = Math.Max(totalWidth - widthNotVisible, 0); 7250int deflateValue = Math.Max(0,(textBounds.Height - 5) / 2); 7789CurrentRow = Math.Max(0, DataGridRowsLength - (policy.AllowAdd ? 2:1)); 7806CurrentRow = Math.Max(0, DataGridRowsLength - (policy.AllowAdd ? 2 : 1)); 7942CurrentRow = Math.Max(0, CurrentRow - numTotallyVisibleRows); 7964CurrentRow = Math.Max(0, 8111CurrentRow = Math.Max(0, DataGridRowsLength - (policy.AllowAdd ? 2:1)); 8607int newFirstRow = Math.Max(0, Math.Min(firstVisibleRow + rows, this.DataGridRowsLength -1));
winforms\Managed\System\WinForms\DataGridBoolColumn.cs (2)
161return new Rectangle(Math.Max(0,bounds.X +((bounds.Width - idealCheckSize) /2)), 162Math.Max(0,bounds.Y +((bounds.Height - idealCheckSize) / 2)),
winforms\Managed\System\WinForms\DataGridParentRows.cs (6)
364colsHeight = Math.Max(colsHeight, cols[j].GetMinimumHeight()); 366height = Math.Max(colsHeight, textRegionHeight); 589width = Math.Max(size, width); 608width = Math.Max(size, width); 627width = Math.Max(size, width); 638colNum = Math.Max(colNum, dgs.GridColumnStyles.Count);
winforms\Managed\System\WinForms\DataGridRelationshipRow.cs (1)
646int paintedWidth = Math.Max(dataWidth, relRect.Width);
winforms\Managed\System\WinForms\DataGridRow.cs (2)
114h = Math.Max(h, columns[i].GetMinimumHeight()); 175height = Math.Max(0, value);
winforms\Managed\System\WinForms\DataGridTable.cs (1)
1176value = Math.Max(this.DataGrid.MinimumRowHeaderWidth(), value);
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (2)
427preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth); 436preferredSize.Height = Math.Max(preferredSize.Height, borderAndPaddingHeights + DATAGRIDVIEWCELL_iconMarginHeight * 2 + iconsHeight);
winforms\Managed\System\WinForms\DataGridViewCellStyle.cs (4)
438value.Left = Math.Max(0, value.Left); 439value.Right = Math.Max(0, value.Right); 440value.Top = Math.Max(0, value.Top); 441value.Bottom = Math.Max(0, value.Bottom);
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (2)
853preferredSize.Width = Math.Max(preferredSize.Width, 858preferredSize.Height = Math.Max(preferredSize.Height,
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (7)
559Math.Max(1, constraintSize.Height - borderAndPaddingHeights - 2 * DATAGRIDVIEWCOLUMNHEADERCELL_verticalMargin), 583preferredSize.Width = Math.Max(preferredSize.Width, 1); 648preferredSize.Height = Math.Max(preferredSize.Height, glyphSize.Height); 649preferredSize.Height = Math.Max(preferredSize.Height, 1); 678preferredSize.Height = Math.Max(preferredSize.Height, sortGlyphHeight); 680preferredSize.Width = Math.Max(preferredSize.Width, 1); 681preferredSize.Height = Math.Max(preferredSize.Height, 1);
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (2)
1470preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + SystemInformation.HorizontalScrollBarThumbWidth + 1 + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth); 1487preferredSize.Height = Math.Max(preferredSize.Height, borderAndPaddingHeights + DATAGRIDVIEWCELL_iconMarginHeight * 2 + iconsHeight);
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (1)
707int hi = Math.Max(e.OldIndex, e.NewIndex);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (2)
587preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth); 596preferredSize.Height = Math.Max(preferredSize.Height, borderAndPaddingHeights + DATAGRIDVIEWCELL_iconMarginHeight * 2 + iconsHeight);
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (4)
687Math.Max(1, maxHeight), 698Math.Max(1, constraintSize.Width - borderAndPaddingWidths - DATAGRIDVIEWLINKCELL_horizontalTextMarginLeft - DATAGRIDVIEWLINKCELL_horizontalTextMarginRight), 743preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth); 756preferredSize.Height = Math.Max(preferredSize.Height, borderAndPaddingHeights + DATAGRIDVIEWCELL_iconMarginHeight * 2 + iconsHeight);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (47)
1121int widthLoss = Math.Min(stepDownAvailableWidthForFillColumns - availableWidth, Math.Max(1, (int)(stepDownAvailableWidthForFillColumns * 0.1F))); 1203mostDeservingDataGridViewColumn.DesiredFillWidth = Math.Max(availableWidth - usedWidth, mostDeservingDataGridViewColumn.MinimumWidth); 1220mostDeservingDataGridViewColumn.DesiredFillWidth = Math.Max(mostDeservingDataGridViewColumn.MinimumWidth, (int)Math.Round(floatDesiredWidth, MidpointRounding.AwayFromZero)); 1759preferredHeight = Math.Max(preferredHeight, this.Columns[columnIndex].HeaderCell.GetPreferredHeight(-1, this.Columns[columnIndex].Thickness)); 1763preferredHeight = Math.Max(preferredHeight, this.Columns[columnIndex].HeaderCell.GetPreferredSize(-1).Height); 1832preferredHeight = Math.Max(preferredHeight, this.Columns[columnIndexTmp].HeaderCell.GetPreferredHeight(-1, this.Columns[columnIndexTmp].Thickness)); 1836preferredHeight = Math.Max(preferredHeight, this.Columns[columnIndexTmp].HeaderCell.GetPreferredSize(-1).Height); 2034preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, this.Rows.SharedRow(rowIndex).GetHeight(rowIndex))); 2038preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2054preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredWidth(rowIndex, dataGridViewRowHeight)); 2058preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndex).Width); 2073preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredWidth(rowIndex, dataGridViewRowHeight)); 2077preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndex).Width); 2092preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredWidth(rowIndex, this.Rows.SharedRow(rowIndex).GetHeight(rowIndex))); 2096preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndex).HeaderCell.GetPreferredSize(rowIndex).Width); 2207preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, this.Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))); 2211preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2227preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredWidth(rowIndexTmp, dataGridViewRowHeight)); 2231preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2246preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredWidth(rowIndexTmp, dataGridViewRowHeight)); 2250preferredWidth = Math.Max(preferredWidth, dataGridViewRow.HeaderCell.GetPreferredSize(rowIndexTmp).Width); 2265preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredWidth(rowIndexTmp, this.Rows.SharedRow(rowIndexTmp).GetHeight(rowIndexTmp))); 2269preferredWidth = Math.Max(preferredWidth, this.Rows.SharedRow(rowIndexTmp).HeaderCell.GetPreferredSize(rowIndexTmp).Width); 3026r.X = Math.Max(inside.Left, r.X); 3033r.X = Math.Max(r.X, inside.Left); 3044r.X = Math.Max(inside.Left, r.X); 3049r.X = Math.Max(r.X, 0); 3059r.Y = Math.Max(r.Y, 0); 4508int oldThumbHeight = Math.Max(((this.vertScrollBar.Height - 2*SystemInformation.VerticalScrollBarArrowHeight) * this.vertScrollBar.LargeChange) / this.vertScrollBar.Maximum, 8); 4518oldThumbHeight != Math.Max(((this.vertScrollBar.Height - 2*SystemInformation.VerticalScrollBarArrowHeight) * this.vertScrollBar.LargeChange) / this.vertScrollBar.Maximum, 8))) 5722rectInsertionBar.X = Math.Max(this.layout.ColumnHeaders.X, 6150newX = Math.Max(x + this.mouseBarOffset, this.layout.Data.X); 6324x = Math.Max(e.X + this.mouseBarOffset, this.layout.Data.Left - 1); 6361proposedHeight = Math.Max(proposedHeight, minimumHeight); 8512return Math.Max(1, 4000 / xOffset); 8646int emptyBackgroundWidth = Math.Max(0, this.layout.Data.Width - this.Columns.GetColumnsWidth(DataGridViewElementStates.Visible)); 8647int emptyBackgroundHeight = Math.Max(0, this.layout.Data.Height - frozenVisibleRowsHeight - trailingScrollingRowsHeight); 9272return Math.Max(1, 600 / yOffset); 10493this.horizScrollBar.LargeChange = Math.Max(totalVisibleWidth - totalVisibleFrozenWidth - widthNotVisible, 0); 11386dataGridViewColumn.ThicknessInternal = Math.Max(dataGridViewColumn.MinimumWidth, dataGridViewColumn.CachedThickness); 11465dataGridViewColumn.ThicknessInternal = Math.Max(dataGridViewColumn.MinimumWidth, dataGridViewColumn.CachedThickness); 14865dataGridViewColumn.ThicknessInternal = Math.Max(dataGridViewColumn.MinimumWidth, dataGridViewColumn.CachedThickness); 17380dataGridViewColumn.ThicknessInternal = Math.Max(dataGridViewColumn.MinimumWidth, dataGridViewColumn.CachedThickness); 17433dataGridViewRow.ThicknessInternal = Math.Max(dataGridViewRow.MinimumHeight, dataGridViewRow.CachedThickness); 19177dataGridViewRow.ThicknessInternal = Math.Max(dataGridViewRow.MinimumHeight, dataGridViewRow.CachedThickness); 20378editingZone.Width = Math.Max(0, editingZone.Width - totalVisibleFrozenWidth); 28514this.VerticalOffset += Math.Max(firstDisplayedScrollingRowHeight, this.vertScrollBar.LargeChange);
winforms\Managed\System\WinForms\DataGridViewRow.cs (2)
1408preferredRowThickness = Math.Max(preferredRowThickness, this.HeaderCell.GetPreferredHeight(rowIndex, this.DataGridView.RowHeadersWidth)); 1412preferredRowThickness = Math.Max(preferredRowThickness, this.HeaderCell.GetPreferredSize(rowIndex).Height);
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (11)
208editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetLeft - 2); 213editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetLeft - 1); 221editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - 3); 231editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetRight); 236editingControlBounds.Width = Math.Max(0, editingControlBounds.Width - DATAGRIDVIEWTEXTBOXCELL_horizontalTextOffsetRight - 1); 247editingControlBounds.Height = Math.Max(0, editingControlBounds.Height - DATAGRIDVIEWTEXTBOXCELL_verticalTextOffsetTop); 259editingControlBounds.Height = Math.Max(0, editingControlBounds.Height - DATAGRIDVIEWTEXTBOXCELL_verticalTextOffsetBottom); 457Math.Max(1, constraintSize.Height - borderAndPaddingHeights - DATAGRIDVIEWTEXTBOXCELL_verticalTextMarginTopWithWrapping - DATAGRIDVIEWTEXTBOXCELL_verticalTextMarginBottom), 468Math.Max(1, constraintSize.Width - borderAndPaddingWidths - DATAGRIDVIEWTEXTBOXCELL_horizontalTextMarginLeft - DATAGRIDVIEWTEXTBOXCELL_horizontalTextMarginRight), 513preferredSize.Width = Math.Max(preferredSize.Width, borderAndPaddingWidths + DATAGRIDVIEWCELL_iconMarginWidth * 2 + iconsWidth); 523preferredSize.Height = Math.Max(preferredSize.Height, borderAndPaddingHeights + DATAGRIDVIEWCELL_iconMarginHeight * 2 + iconsHeight);
winforms\Managed\System\WinForms\DataGridViewUtilities.cs (3)
214preferredWidth = Math.Max(preferredWidth, 1); 264return new Size(0, Math.Max(minHeightIcon, minHeightContent) + borderAndPaddingHeights); 297preferredSize.Height = Math.Max(preferredSize.Height,
winforms\Managed\System\WinForms\Form.cs (12)
1772Size = new Size(Math.Max(size.Width, value.Width), Math.Max(size.Height, value.Height)); 4023cp.X = Math.Max(clientRect.X,clientRect.X + (clientRect.Width - cp.Width)/2); 4024cp.Y = Math.Max(clientRect.Y,clientRect.Y + (clientRect.Height - cp.Height)/2); 4039cp.X = Math.Max(screenRect.X,screenRect.X + (screenRect.Width - cp.Width)/2); 4040cp.Y = Math.Max(screenRect.Y,screenRect.Y + (screenRect.Height - cp.Height)/2); 4507p.X = Math.Max(screenRect.X,screenRect.X + (screenRect.Width - Width)/2); 4508p.Y = Math.Max(screenRect.Y,screenRect.Y + (screenRect.Height - Height)/2); 7212mmi.ptMaxTrackSize.x = Math.Max(maxTrack.Width, minTrackWindowSize.Width); 7213mmi.ptMaxTrackSize.y = Math.Max(maxTrack.Height, minTrackWindowSize.Height); 7224mmi.ptMinTrackSize.x = Math.Max(mmi.ptMinTrackSize.x, 100); 7225mmi.ptMinTrackSize.y = Math.Max(mmi.ptMinTrackSize.y, SystemInformation.CaptionButtonSize.Height * 3);
winforms\Managed\System\WinForms\GroupBox.cs (2)
220return new Rectangle(padding.Left, fontHeight + padding.Top, Math.Max(size.Width - padding.Horizontal, 0), Math.Max(size.Height - fontHeight - padding.Vertical, 0));
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (1)
195clipMiddle.Width = Math.Max(0, textBounds.Width - 3); // -3 to account for the margin built in the MeasureText result
winforms\Managed\System\WinForms\Layout\CommonProperties.cs (2)
236bounds.Width = Math.Max(bounds.Width, value.Width); 237bounds.Height = Math.Max(bounds.Height, value.Height);
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (14)
195left = Math.Max(Math.Abs(left), Math.Abs(cachedBounds.Left)); 197right = left + Math.Max(element.Bounds.Width, cachedBounds.Width) + Math.Abs(right); 209top = Math.Max(Math.Abs(top), Math.Abs(cachedBounds.Top)); 211bottom = top + Math.Max(element.Bounds.Height, cachedBounds.Height) + Math.Abs(bottom); 350Math.Max(0, newElementBounds.Width - remainingBounds.Width), 351Math.Max(0, newElementBounds.Height - remainingBounds.Height)); 395newSize.Width = Math.Max(newSize.Width, remainingSize.Width); 410newSize.Height = Math.Max(newSize.Height, remainingSize.Height); 836prefSize.Width = Math.Max(prefSize.Width, elementSpace.Right); 842prefSize.Height = Math.Max(prefSize.Height, elementSpace.Bottom); 851prefSize.Width = Math.Max(prefSize.Width, elementSpace.Right + anchorDest.Width); 854prefSize.Width = Math.Max(prefSize.Width, anchorDest.Right); 863prefSize.Height = Math.Max(prefSize.Height, elementSpace.Bottom + anchorDest.Height); 866prefSize.Height = Math.Max(prefSize.Height, anchorDest.Bottom);
winforms\Managed\System\WinForms\Layout\FlowLayout.cs (2)
135layoutSize.Width = Math.Max(layoutSize.Width, rowSize.Width); 252rowSize.Height = Math.Max(rowSize.Height, requiredSize.Height);
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (10)
58largestSize.Width = Math.Max(largestSize.Width, textSize.Width); 59largestSize.Height = Math.Max(largestSize.Height, textSize.Height); 140padding.Left = Math.Max(0, padding.Left); 141padding.Top = Math.Max(0, padding.Top); 142padding.Right = Math.Max(0, padding.Right); 143padding.Bottom = Math.Max(0, padding.Bottom); 198Math.Max(a.Width, b.Width), 199Math.Max(a.Height, b.Height)); 345currentSize.Width = Math.Max(currentSize.Width, contentSize.Width); 349currentSize.Height = Math.Max(currentSize.Height, contentSize.Height);
winforms\Managed\System\WinForms\Layout\TableLayout.cs (24)
196containerSize.Width = Math.Max(containerSize.Width, 1); 197containerSize.Height = Math.Max(containerSize.Height, 1); 255containerSize.Width = Math.Max(containerSize.Width, 1); 256containerSize.Height = Math.Max(containerSize.Height, 1); 268proposedConstraints.Width = Math.Max(proposedConstraints.Width, 1); 269proposedConstraints.Height = Math.Max(proposedConstraints.Height, 1); 348numRows = Math.Max(1, numRows); 349numCols = Math.Max(1, numCols); 365int estimatedCols = Math.Max((int)Math.Ceiling((float)minSpace / numRows), minColumn); 368estimatedCols = Math.Max(estimatedCols, 1); 379xAssignRowsAndColumns(containerInfo, childrenInfo, /* numCols = */ Math.Max(minColumn,1), /* numRows = */ Int32.MaxValue, growStyle); 467fixedElement.ColumnStart = Math.Max(fixedElement.ColumnStart, currentCol); 472fixedElement.RowStart = Math.Max(fixedElement.RowStart, currentRow); 505numRows = (numRows == Int32.MaxValue) ? rowStop : Math.Max(numRows, rowStop); 506numColumns = (numColumns == Int32.MaxValue) ? colStop : Math.Max(numColumns, colStop); 521 numRows = Math.Max(containerInfo.MaxRows, numRows); 525numColumns = Math.Max(containerInfo.MaxColumns, numColumns); 665int expandLastElementWidth = Math.Max(0,proposedConstraints.Width - preferredSize.Width); 891desiredLength = Math.Max(0, desiredLength); 1107maxPercentWidth = Math.Max(maxPercentWidth, totalWidth); 1229cellBounds.Width = Math.Max(cellBounds.Width, 1); 1230cellBounds.Height = Math.Max(cellBounds.Height , 1); 1694_minColumns = Math.Max(_minColumns, layoutInfo.ColumnPosition + layoutInfo.ColumnSpan); 1695_minRows = Math.Max(_minRows, layoutInfo.RowPosition + layoutInfo.RowSpan);
winforms\Managed\System\WinForms\LinkLabel.cs (1)
1846int maxStart = Math.Max(left.Start, right.Start);
winforms\Managed\System\WinForms\ListBox.cs (8)
1361return Math.Max(oldMax, textSize.Width); 2333bounds.Width = Math.Max(ColumnWidth, bounds.Width); 2336bounds.Width = Math.Max(MaxItemWidth, bounds.Width); 2484Height = Math.Max(Height,ItemHeight); 2593entries = new Entry[Math.Max(elements, 4)]; 2596int newLength = Math.Max(entries.Length * 2, entries.Length + elements); 3621innerArray = new int[Math.Max(elements, 4)]; 3624int newLength = Math.Max(innerArray.Length * 2, innerArray.Length + elements);
winforms\Managed\System\WinForms\ListView.cs (5)
3133y = Math.Max(itemBounds.Top, iconBounds.Top) - 1; 3136y = Math.Max(itemBounds.Top, iconBounds.Top) + 1; 3139x = Math.Max(itemBounds.Left, iconBounds.Left) - 1; 3142x = Math.Max(itemBounds.Left, iconBounds.Left) + 1; 5682int hiDI = Math.Max(from, to);
winforms\Managed\System\WinForms\Printing\PageSetupDialog.cs (4)
400data.marginLeft = Math.Max(data.marginLeft, data.minMarginLeft); 401data.marginTop = Math.Max(data.marginTop, data.minMarginTop); 402data.marginRight = Math.Max(data.marginRight, data.minMarginRight); 403data.marginBottom = Math.Max(data.marginBottom, data.minMarginBottom);
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (11)
288value = Math.Max(value, 0); 579Point offset = new Point(Math.Max(0, (Size.Width - virtualPixels.X) / 2), 580Math.Max(0, (Size.Height - virtualPixels.Y) / 2)); 619maxImageHeight = Math.Max(maxImageHeight, imagePixels.Y); 733int maxPos = Math.Max(Width, virtualSize.Width /*- Width*/); 767info.nMax = Math.Max(Height, virtualSize.Height) - 1; 773info.nMax = Math.Max(Width, virtualSize.Width) - 1; 796int maxPos = Math.Max(Height, virtualSize.Height/* - Height*/); 839maxPos = Math.Max(Width, virtualSize.Width /*- Width*/); 878maxPos = Math.Max(Height, virtualSize.Height/* - Height*/); 903maxPos = Math.Max(Width, virtualSize.Width /*- Width*/);
winforms\Managed\System\WinForms\PropertyGrid.cs (4)
2337cyNew = Math.Max(DividerLimitHigh(target), cyNew); 3082height = Math.Max(height, cyDivider * 2); 3113height = Math.Max(height, cyDivider * 2); 3202size.Height = Math.Max(0,yNew);
winforms\Managed\System\WinForms\PropertyGridInternal\DocComment.cs (5)
96return Math.Max(height + 2 * padding, DpiHelper.EnableDpiChangedHighDpiImprovements ? LogicalToDeviceUnits(CYDEF) : CYDEF); 144size.Width = Math.Max(0, size.Width - 2 * cBorder); 145size.Height = Math.Max(0, size.Height - 2 * cBorder); 156Math.Max(0, size.Height - lineHeight - (DpiHelper.EnableDpiChangedHighDpiImprovements ? LogicalToDeviceUnits(1) : 1)), 192int lines = Math.Max(MIN_LINES, cyNew/lineHeight);
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (17)
509requiredLabelPaintMargin = (short)Math.Max(Math.Max(value, requiredLabelPaintMargin), GDIPLUS_SPACE); 1636size.Width = Math.Max(rect.Width + 1, size.Width); 1642Math.Max(rectScreen.X, loc.X + rect.X + rect.Width - size.Width)); 1715size.Width = Math.Max(rect.Width + 1, size.Width); 1721Math.Max(rectScreen.X, loc.X + rect.X + rect.Width - size.Width)); 2349int pos = Math.Max(Math.Min(xpos,widthPS-10),GetOutlineIconSize() * 2); 3369int newOffset = Math.Max(0,initialOffset - large); 3400int newOffset = Math.Max(0,initialOffset - scrollBands); 3464startRow = Math.Max(0,posStart.Y); 3887maxWidth = Math.Max((int) textSize.cx, maxWidth); 3907DropDownListBox.Height = Math.Max(tm.tmHeight + 2, Math.Min(maxListBoxHeight, DropDownListBox.PreferredHeight)); 3908DropDownListBox.Width = Math.Max(maxWidth, GetRectangle(row,ROWVALUE).Width); 4665int posNew = Math.Max(0, Math.Min(totalProps - visibleRows + 1, cOffset)); 4890ScrollBar.Maximum = Math.Max(0,totalProps - 1); 5838newBounds.Height = Math.Max(MinDropDownSize.Height, dragBaseRect.Height + (dragPoint.Y - dragStart.Y)); 5988lb.Height = Math.Max(lb.Height, lb.ItemHeight);
winforms\Managed\System\WinForms\RadioButton.cs (1)
324size.Height = DpiHelper.EnableDpiChangedHighDpiImprovements ? Math.Max(size.Height + 5, flatSystemStyleMinimumHeight) : size.Height + 5; // ensure minimum height to avoid truncation of RadioButton circle or text
winforms\Managed\System\WinForms\RichTextBox.cs (1)
2331index = Math.Max(t.Length - 1, 0);
winforms\Managed\System\WinForms\ScrollableControl.cs (4)
288displayRectangle.Width = Math.Max(displayRectangle.Width, AutoScrollMinSize.Width); 289displayRectangle.Height = Math.Max(displayRectangle.Height, AutoScrollMinSize.Height); 713pos = Math.Max(pos - e.Delta, 0); 728pos = Math.Max(pos - e.Delta, 0);
winforms\Managed\System\WinForms\ScrollBar.cs (2)
876newValue = Math.Max(value - SmallChange, minimum); 884newValue = Math.Max(value - LargeChange, minimum);
winforms\Managed\System\WinForms\SplitContainer.cs (18)
1153splitterDistance = (splitterDistance < Panel1MinSize) ? splitterDistance + SplitterIncrement : Math.Max(splitterDistance, BORDERSIZE); 1276x = Math.Max(Math.Min(x, Width - Panel2MinSize), Panel1MinSize); 1277y = Math.Max(y, 0); 1280y = Math.Max(Math.Min(y, Height - Panel2MinSize), Panel1MinSize); 1281x = Math.Max(x, 0); 1666size = Math.Max(panel1.Width + delta, BORDERSIZE); 1670size = Math.Max(panel1.Width - delta, BORDERSIZE); 1674size = Math.Max(panel1.Height + delta, BORDERSIZE); 1678return Math.Max(Math.Min(size, Width - Panel2MinSize), Panel1MinSize); 1681return Math.Max(Math.Min(size, Height - Panel2MinSize), Panel1MinSize); 1772panel2.Size = new Size(Math.Max(Width - panelSize - SplitterWidthInternal, Panel2MinSize), Height); 1776splitterDistance = Math.Max(Width - panelSize - SplitterWidthInternal, Panel1MinSize); 1782splitterDistance = Math.Max((int)(Math.Floor(this.Width / ratioWidth)), Panel1MinSize); 1786panel2.Size = new Size(Math.Max(Width - splitterDistance - SplitterWidthInternal, Panel2MinSize), Height); 1819panel2.Size = new Size(Width, Math.Max(Height - panel2Start, Panel2MinSize)); 1825splitterDistance = Math.Max(Height - Panel2.Height - SplitterWidthInternal, Panel1MinSize); 1835splitterDistance = Math.Max((int)(Math.Floor(this.Height / ratioHeight )), Panel1MinSize); 1840panel2.Size = new Size(Width,Math.Max(Height - panel2Start, Panel2MinSize));
winforms\Managed\System\WinForms\Splitter.cs (1)
859return Math.Max(Math.Min(size, maxSize), minSize);
winforms\Managed\System\WinForms\StatusBar.cs (1)
114sizeGripWidth = Math.Max(sizeGripWidth, 16);
winforms\Managed\System\WinForms\StatusBarPanel.cs (1)
563return Math.Max(width, minWidth);
winforms\Managed\System\WinForms\StatusStrip.cs (2)
494TableLayoutSettings.RowStyles[0].Height = Math.Max(0,this.DisplayRectangle.Height); 537TableLayoutSettings.ColumnStyles[0].Width = Math.Max(0,this.DisplayRectangle.Width);
winforms\Managed\System\WinForms\TextBoxBase.cs (5)
990textSize.Height = Math.Max(textSize.Height, FontHeight); 1019start = Math.Max( 0, start ); 1021end = Math.Max( 0, end ); 1391Height = Math.Max(saveHeight, PreferredHeight + 2); // 2 = fudge factor 1768index = Math.Max(t.Length - 1, 0);
winforms\Managed\System\WinForms\ThreadExceptionDialog.cs (1)
253int buttonTop = Math.Max(textSize.Height, scaledMaxTextHeight) + scaledPaddingHeight;
winforms\Managed\System\WinForms\ToolStrip.cs (10)
2482maxSize.Height = Math.Max(0, defaultSize.Height); 2496maxSize.Height = Math.Max(maxSize.Height, itemMargin.Vertical + prefItemSize.Height); 2551maxSize.Width = Math.Max(maxSize.Width, itemMargin.Horizontal + preferredSize.Width); 3046startIndex = Math.Max(0, startIndex); 4291gripRectangle.X = Math.Max(0, displayRect.X - Grip.GripThickness); 4292gripRectangle.Y = Math.Max(0,displayRect.Top - Grip.Margin.Top); 5423int insertIndex = Math.Max(0, toolStripItemIndex); 5438insertIndex = Math.Max(0, (owner.RightToLeft == RightToLeft.Yes) ? insertIndex + 1 : insertIndex); 5446insertIndex = Math.Max(0, (owner.RightToLeft == RightToLeft.No) ? insertIndex + 1 : insertIndex); 5457owner.Items.MoveItem(Math.Max(0,insertIndex), droppedItem);
winforms\Managed\System\WinForms\ToolStripButton.cs (1)
211prefSize.Width = Math.Max(prefSize.Width, standardButtonWidth);
winforms\Managed\System\WinForms\ToolStripComboBox.cs (1)
496preferredSize.Width = Math.Max(preferredSize.Width, 75);
winforms\Managed\System\WinForms\ToolStripDropDown.cs (1)
2111countDropDownItemsAssignedTo = Math.Max(--countDropDownItemsAssignedTo, 0);
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (15)
355menuItemTextSize.Height = Math.Max(menuItemTextSize.Height, shortcutTextSize.Height); 359maxTextSize.Width = Math.Max(maxTextSize.Width, menuItemTextSize.Width); 360maxTextSize.Height = Math.Max(maxTextSize.Height, menuItemTextSize.Height); 368maxImageSize.Width = Math.Max(maxImageSize.Width, imageSize.Width); 369maxImageSize.Height = Math.Max(maxImageSize.Height, imageSize.Height); 373maxCheckSize.Width = Math.Max(checkedImageSize.Width, maxCheckSize.Width); 374maxCheckSize.Height = Math.Max(checkedImageSize.Height, maxCheckSize.Height); 378maxNonMenuItemSize.Height = Math.Max(item.Bounds.Height, maxNonMenuItemSize.Height); 379maxNonMenuItemSize.Width = Math.Max(item.Bounds.Width, maxNonMenuItemSize.Width); 383this.maxItemSize.Height = Math.Max(maxTextSize.Height + scaledTextPadding.Vertical, Math.Max(maxCheckSize.Height + scaledCheckPadding.Vertical, maxArrowSize.Height + scaledArrowPadding.Vertical)); 387this.maxItemSize.Height = Math.Max(maxImageSize.Height + scaledImagePadding.Vertical, maxItemSize.Height); 400maxTextSize.Width = Math.Max(maxTextSize.Width, maxNonMenuItemSize.Width); 405int extraImageWidth = Math.Max(0, maxImageSize.Width - scaledDefaultImageSize.Width); 819maxY = Math.Max(maxY, item.Bounds.Bottom);
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (2)
1195rect.X = Math.Max(rect.X,0); 1299slowShow = Math.Max(quickShow, SystemInformation.MenuShowDelay);
winforms\Managed\System\WinForms\ToolStripPanelRow.cs (11)
428cachedBounds.X -= Math.Max(0, margins[i] - c.Margin.Left); 458cellOffsets[j] += Math.Max(0,currentCell.CachedBounds.Width-cachedBounds.Width); 510cachedBounds.X = Math.Max(0, cachedBounds.X - margins[i] - c.Margin.Top); 540cellOffsets[j] += Math.Max(0,currentCell.CachedBounds.Height-cachedBounds.Height); 1037return requiredSpace - Math.Max(0,spaceToFree); 1349nextCellMargin.Left = Math.Max(0, nextCellMargin.Left - freedSpace); 1365lastCellMargin.Left = Math.Max(0,locationToDrag.X - nextCell.Bounds.Right); 1411cellMargin.Left = Math.Max(0,locationToDrag.X-Row.Margin.Left); 1548return requiredSpace - Math.Max(0,spaceToFree); 1897lastCellMargin.Top = Math.Max(0,locationToDrag.Y - nextCell.Bounds.Bottom); 1937cellMargin.Top = Math.Max(0,locationToDrag.Y-Row.Margin.Top);
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (1)
1273bounds.Height = Math.Max(0, bounds.Height -6);
winforms\Managed\System\WinForms\ToolStripSplitButton.cs (2)
375int splitButtonButtonWidth = Math.Max(0, this.Width - dropDownButtonBounds.Width); 376int splitButtonButtonHeight = Math.Max(0, this.Height);
winforms\Managed\System\WinForms\ToolStripSplitStackLayout.cs (2)
363itemSize.Height = Math.Max(displayRectangle.Height - itemMargin.Vertical, 0); 488itemSize.Width = Math.Max(toolStripPreferredSize.Width - itemMargin.Horizontal -1, 0);
winforms\Managed\System\WinForms\ToolStripSystemRenderer.cs (1)
269bounds.Y = Math.Max(0,(e.GripBounds.Height - bounds.Height -2/*number of pixels for border*/) / 2);
winforms\Managed\System\WinForms\TrackBar.cs (1)
1012Value = Math.Max(Value-absScrollBands, Minimum);
winforms\Managed\System\WinForms\TreeNode.cs (1)
1963item.iImage = Math.Max(0, ((ImageIndexer.ActualIndex >= tv.ImageList.Images.Count) ? tv.ImageList.Images.Count - 1 : ImageIndexer.ActualIndex));
winforms\Managed\System\WinForms\TreeView.cs (3)
562return Math.Max(0, imageList.Images.Count - 1); 797return Math.Max(16, FontHeight + 3); 1052return Math.Max(0, imageList.Images.Count - 1);
System.Windows.Forms.DataVisualization (26)
Common\ChartTypes\PieChart.cs (1)
5240 numOfItems = Math.Max( numOfItems, maxNumOfRows );
Common\ChartTypes\RadarChart.cs (1)
303 sectorNumber = (int)Math.Max(series.Points.Count, sectorNumber);
Common\DataManager\DataManager.cs (1)
303 numberOfPoints = Math.Max(numberOfPoints, this._series[seriesName].Points.Count);
Common\General\Axis.cs (3)
3719 size = (float)Math.Max(this.LabelAutoFitMaxFontSize, this.LabelAutoFitMinFontSize); 4765 Math.Max(this.LabelAutoFitMaxFontSize, this.LabelAutoFitMinFontSize), 5891groupLabelLevel = Math.Max(groupLabelLevel, label.RowIndex);
Common\General\AxisLabels.cs (1)
807maxPointCount = Math.Max(maxPointCount, ser.Points.Count);
Common\General\AxisScaleBreaks.cs (1)
967numberOfPoints = Math.Max(numberOfPoints, series.Points.Count);
Common\General\Chart.cs (4)
320image = new Bitmap(Math.Max(1,Width), Math.Max(1,Height)); 1623Bitmap image = new Bitmap(Math.Max(1,Width), Math.Max(1,Height));
Common\General\ChartGraphics3D.cs (2)
2500 leftPoint = ChartGraphics.FindPointByIndex(points, Math.Max(firstPoint.index, secondPoint.index) + 1, (multiSeries) ? secondPoint : null, ref pointArrayIndex); 2551 rightPoint = ChartGraphics.FindPointByIndex(points, Math.Max(firstPoint.index, secondPoint.index) + 1, (multiSeries) ? secondPoint : null, ref pointArrayIndex);
Common\General\DataManipulator.cs (1)
3020 numberOfYValues = (int)Math.Max(numberOfYValues, series.YValuesPerPoint);
Common\General\Legend.cs (11)
502 highestHeader.Height = Math.Max(highestHeader.Height, headerSize.Height); 515 this._headerPosition.Height = Math.Max(this._headerPosition.Height, 0); 952 highestHeader.Height = Math.Max(highestHeader.Height, headerSize.Height); 1035 optimalSize.Width = Math.Max(optimalSize.Width, titleSize.Width); 1398 maxColumnHeight = Math.Max(maxColumnHeight, columnHeight); 1680 maxNumberOfColumns = Math.Max(maxNumberOfColumns, rowsPerColumn[columnIndex]); 1813 Math.Max(cellHeights[currentColumn, currentRow], cellSize.Height); 1869 width = Math.Max(width, cellWidth ); 1979 width = Math.Max(width, subColumnSizes[currentColumn, currentSubColumn]); 2019 totalHeight = Math.Max(totalHeight, columnHeight); 2056 this._numberOfCells = Math.Max(this._numberOfCells, legendItem.Cells.Count);
System.Workflow.Activities (31)
Designers\StateDesigner.cs (6)
1426deltaY = Math.Max(deltaY, minimumY - stateDesigner.Location.Y); 1457maximumY = Math.Max(maximumY, stateDesigner.Bounds.Bottom); 1504newSize.Width = Math.Max(newSize.Width, bounds.Right); 1505newSize.Height = Math.Max(newSize.Height, bounds.Bottom); 1508newSize.Width = Math.Max(newSize.Width, this.MinimumSize.Width); 1509newSize.Height = Math.Max(newSize.Height, this.MinimumSize.Height);
Designers\StateDesigner.Layouts.cs (21)
451int height = Math.Max(_imageSize.Height, _textSize.Height); 669minimumSize.Width = Math.Max(minimumSize.Width, layoutWidth); 678size.Width = Math.Max(containerSize.Width, minimumSize.Height); 774size.Height = Math.Max(size.Height, layout.Size.Height); 970minimumSize.Height = Math.Max(_textLayout.Size.Height, _imageLayout.Size.Height); 975size.Width = Math.Max(minimumSize.Width, containerSize.Width); 1103minimumSize.Width = Math.Max(minimumSize.Width, RealMinimumSize.Width); 1104minimumSize.Height = Math.Max(minimumSize.Height, RealMinimumSize.Height); 1132int minWidth = Math.Max(_titleBarLayout.MinimumSize.Width, _eventHandlersLayout.MinimumSize.Width); 1136size.Width = Math.Max(minWidth, size.Width); 1137size.Height = Math.Max(minHeight, size.Height); 1159maximumX = Math.Max(maximumX, designer.Size.Width); 1320size.Width = Math.Max(size.Width, minSize.Width); 1321size.Height = Math.Max(size.Height, minSize.Height); 1331size.Width = Math.Max(size.Width, activeDesignerSize.Width + ActiveDesignerPadding * 2); 1332size.Width = Math.Max(size.Width, _titleBarLayout.Size.Width); 1333size.Width = Math.Max(size.Width, _breadCrumbBarLayout.Size.Width); 1341size.Height = Math.Max(size.Height, minHeight); 1347size.Width = Math.Max(size.Width, activeDesigner.Size.Width + ActiveDesignerPadding * 2); 1348size.Width = Math.Max(size.Width, _designerLayout.Size.Width); 1349size.Height = Math.Max(size.Height, activeDesigner.Size.Height + ActiveDesignerPadding * 2 + _designerLayout.Size.Height + ambientTheme.SelectionSize.Height * 2);
Designers\StateMachineWorkflowDesigner.cs (4)
81minimumSize.Width = Math.Max(minimumSize.Width, MinSize.Width); 82minimumSize.Height = Math.Max(minimumSize.Height, MinSize.Height); 85minimumSize.Width = Math.Max(minimumSize.Width, ParentView.ViewPortSize.Width - StateDesigner.Separator.Width * 2); 86minimumSize.Height = Math.Max(minimumSize.Height, ParentView.ViewPortSize.Height - StateDesigner.Separator.Height * 2);
System.Workflow.ComponentModel (153)
AuthoringOM\Design\ActivityDesigner.cs (4)
237value.Width = Math.Max(value.Width, MinimumSize.Width); 238value.Height = Math.Max(value.Height, MinimumSize.Height); 1721this.textSize.Width = Math.Max(this.textSize.Width, requestedLineSize.Width); 1737size.Height = e.AmbientTheme.Margin.Height + Math.Max(e.DesignerTheme.ImageSize.Height, this.textSize.Height) + e.AmbientTheme.Margin.Height;
AuthoringOM\Design\ActivityPreviewDesigner.cs (7)
613containerSize.Width = Math.Max(containerSize.Width, this.previewStrip.Size.Width); 622containerSize.Width = Math.Max(containerSize.Width, this.previewWindow.Size.Width); 631containerSize.Width = Math.Max(containerSize.Width, size.Width); 637containerSize.Width = Math.Max(containerSize.Width, MinimumSize.Width); 638containerSize.Height = Math.Max(containerSize.Height, MinimumSize.Height); 935Size selectionSize = new Size(Math.Max(itemBounds.Width / 6, 1), Math.Max(itemBounds.Height / 6, 1));
AuthoringOM\Design\CommandSet.cs (1)
290this.workflowView.Zoom = Math.Min(Math.Max(newZoom, AmbientTheme.MinZoom), AmbientTheme.MaxZoom);
AuthoringOM\Design\CompositeActivityDesigner.cs (4)
267titleHeight = Math.Max(expandButtonRectangle.Height, textRectangle.Height); 272titleHeight = Math.Max(expandButtonRectangle.Height, imageRectangle.Height); 345textSize.Width = Math.Max(1, Math.Max(textSize.Width, requestedLineSize.Width));
AuthoringOM\Design\Connector.cs (12)
189defaultSize = new Size(Math.Max(defaultSize.Width, (int)this.associatedDesigner.DesignerTheme.ForegroundPen.Width * 4), Math.Max(defaultSize.Height, (int)this.associatedDesigner.DesignerTheme.ForegroundPen.Width * 4)); 1819begin.X = Math.Min(Math.Max(begin.X, enclosingRectangle.Left + 1), enclosingRectangle.Right - 1); 1820begin.Y = Math.Min(Math.Max(begin.Y, enclosingRectangle.Top + 1), enclosingRectangle.Bottom - 1); 1826int width = Math.Max(margin.Width / 2, 1), height = Math.Max(margin.Height / 2, 1); 2474int steps = Math.Max(Math.Abs(direction.X / margin.Width), Math.Abs(direction.Y / margin.Height)); //one of the values will be null 2618return (this.orientation == Orientation.Horizontal) ? (p.X >= Math.Min(this.point1.X, this.point2.X) && p.X <= Math.Max(this.point1.X, this.point2.X)) : (p.Y >= Math.Min(this.point1.Y, this.point2.Y) && p.Y <= Math.Max(this.point1.Y, this.point2.Y)); 2632if (vertical.A.X < Math.Min(horizontal.A.X, horizontal.B.X) || vertical.A.X > Math.Max(horizontal.A.X, horizontal.B.X)) 2635if (horizontal.A.Y < Math.Min(vertical.A.Y, vertical.B.Y) || horizontal.A.Y > Math.Max(vertical.A.Y, vertical.B.Y)) 2656return k >= Math.Min(k1, k2) && k <= Math.Max(k1, k2);
AuthoringOM\Design\DesignerHelpers.cs (8)
295int alpha = Math.Max(0, Convert.ToInt32(transparency * 255)); 335for (int gridCoOrdX = gridStart.X; gridCoOrdX <= viewableRectangle.Right; gridCoOrdX += Math.Max(ambientTheme.GridSize.Width, 1)) 337for (int gridCoOrdY = gridStart.Y; gridCoOrdY <= viewableRectangle.Bottom; gridCoOrdY += Math.Max(ambientTheme.GridSize.Height, 1)) 465int alphaIncreament = Math.Max((baseAlphaLevel / shadowDepth), 2); 1034for (int gridCoOrd = gridStart.X; gridCoOrd <= viewableRectangle.Right; gridCoOrd += Math.Max(gridUnit.Width, 1)) 1063for (int gridCoOrd = gridStart.Y; gridCoOrd <= viewableRectangle.Bottom; gridCoOrd += Math.Max(gridUnit.Height, 1)) 1890rightBottom.X = Math.Max(rightBottom.X, point.X); 1891rightBottom.Y = Math.Max(rightBottom.Y, point.Y);
AuthoringOM\Design\DesignerWidgets.cs (21)
693if (newPosition >= 0 && newPosition <= Math.Max(this.items.Count - visibleItems + 1, 0)) 842visibleItemCount = totalStripSize / Math.Max((this.itemSize.Width + this.margin.Width), 1); 847visibleItemCount = totalStripSize / Math.Max((this.itemSize.Height + this.margin.Height), 1); 850return Math.Max(visibleItemCount, 1); 898newPosition = Math.Max(index - 1, 0); 1342maxTextSize.Width = Math.Max(Convert.ToInt32(Math.Ceiling(size.Width)), maxTextSize.Width); 1343maxTextSize.Height = Math.Max(Convert.ToInt32(Math.Ceiling(size.Height)), maxTextSize.Height); 1348this.itemHeight = Math.Max(imageRectangle.Height, maxTextSize.Height + 2) + 3; 1553int minExtra = Math.Max(this.splitter.MinSize, Width - this.tabStrip.MaximumRequiredSize - this.splitter.Width); 1560int minExtra = Math.Max(this.splitter.MinSize, Height - this.tabStrip.MaximumRequiredSize - this.splitter.Height); 1700this.reqTabItemSize = Math.Max(tabSize, TabStrip.MinSize); 2009int itemSizeDecrease = (int)Math.Ceiling(((double)(offset - maxTotalTabItemSize)) / (double)Math.Max(1, this.tabItemList.Count)); 2016itemSizeDecrease += (int)Math.Ceiling(((double)(this.reqTabItemSize - lastItemWidth)) / (double)Math.Max(1, this.tabItemList.Count)); 2711int selectionSize = Math.Max(Math.Min(itemMargin.Width / 4, itemMargin.Height / 2), 1); 2789if (newMarker >= 0 && newMarker <= Math.Max(this.items.Count - VisibleItemCount + 1, 0)) 3114index = Math.Max(Math.Min(accessibleObjects.Length - 1, index), 0); 3242int maxDescHeight = Math.Max(this.previewModeDescRectangle.Height, this.previewModeButtonRectangle.Height); 3376this.canvasBounds.Size = new Size(Math.Max(this.canvasBounds.Width, designerTheme.PreviewWindowSize.Width), Math.Max(this.canvasBounds.Height, designerTheme.PreviewWindowSize.Height)); 3383this.canvasBounds.Width = Math.Max(this.canvasBounds.Width, minWidth); 3395totalSize.Height = Math.Max(this.previewModeButtonRectangle.Size.Height, this.previewDescTextSize.Height);
AuthoringOM\Design\Dialogs\ThemeConfigurationDialog.cs (1)
381this.designerTreeView.ItemHeight = Math.Max(this.designerTreeView.ItemHeight, 18);
AuthoringOM\Design\DocumentOutline.cs (1)
71this.treeView.ItemHeight = Math.Max(this.treeView.ItemHeight, 18);
AuthoringOM\Design\FreeFormDesigner.cs (10)
253minimumSize.Width = Math.Max(minimumSize.Width, workflowView.ViewPortSize.Width - 2 * WorkflowRootLayout.Separator.Width); 254minimumSize.Height = Math.Max(minimumSize.Height, workflowView.ViewPortSize.Height - 2 * WorkflowRootLayout.Separator.Height); 262minimumSize.Width = Math.Max(minimumSize.Width, childRectangle.Width); 263minimumSize.Height = Math.Max(minimumSize.Height, childRectangle.Height); 823size.Width += Math.Max(bounds.Left - childRectangle.Left, 0); 824size.Width += Math.Max(childRectangle.Right - bounds.Right, 0); 825size.Height += Math.Max(bounds.Top - childRectangle.Top, 0); 826size.Height += Math.Max(childRectangle.Bottom - bounds.Bottom, 0); 937bounds.Width = Math.Max(minRectangle.Right - bounds.Left, e.Bounds.Right - bounds.Left); 938bounds.Height = Math.Max(minRectangle.Bottom - bounds.Top, e.Bounds.Bottom - bounds.Top);
AuthoringOM\Design\MessageFilters\DragDropManager.cs (1)
678Size draggedImageSize = parentView.LogicalSizeToClient(new Size(imageRectangle.Width + descriptionRectangle.Width, Math.Max(imageRectangle.Height, descriptionRectangle.Height)));
AuthoringOM\Design\MessageFilters\DynamicActionMessageFilter.cs (1)
569int buttonCount = Math.Max(1, this.buttons.Count);
AuthoringOM\Design\MessageFilters\ResizingMessageFilter.cs (4)
287x = Math.Max(x, clipBounds.X); 299y = Math.Max(y, clipBounds.Y); 314designerBounds.Width = Math.Max(designerBounds.Width, designerToSize.MinimumSize.Width); 315designerBounds.Height = Math.Max(designerBounds.Height, designerToSize.MinimumSize.Height);
AuthoringOM\Design\MessageFilters\WindowManager.cs (1)
425newZoom = Math.Max(newZoom, AmbientTheme.MinZoom);
AuthoringOM\Design\MessageFilters\ZoomingMessageFilter.cs (1)
185parentView.Zoom = Math.Min(Math.Max(zoomLevel, AmbientTheme.MinZoom), AmbientTheme.MaxZoom);
AuthoringOM\Design\ParallelActivityDesigner.cs (2)
256containerSize.Height = Math.Max(containerSize.Height, childSize.Height); 268size.Width = Math.Max(size.Width, containerSize.Width);
AuthoringOM\Design\SequentialActivityDesigner.cs (4)
485containerSize.Width = Math.Max(containerSize.Width, childSize.Width); 493containerSize.Width = Math.Max(helpTextRectangle.Width, containerSize.Width); 498containerSize.Width = Math.Max(containerSize.Width, compositeDesignerTheme.Size.Width); 501containerSize.Height = Math.Max(containerSize.Height, compositeDesignerTheme.Size.Height);
AuthoringOM\Design\SequentialWorkflowHeaderFooter.cs (1)
111bounds.Width = Math.Max(imageBounds.Width, textBounds.Width) + 2 * margin.Width;
AuthoringOM\Design\SequentialWorkflowRootDesigner.cs (7)
94minimumSize.Width = Math.Max(minimumSize.Width, SequentialWorkflowRootDesigner.MinSize.Width); 95minimumSize.Height = Math.Max(minimumSize.Width, SequentialWorkflowRootDesigner.MinSize.Height); 98minimumSize.Width = Math.Max(minimumSize.Width, ParentView.ViewPortSize.Width - 2 * WorkflowRootLayout.Separator.Width); 99minimumSize.Height = Math.Max(minimumSize.Height, ParentView.ViewPortSize.Height - 2 * WorkflowRootLayout.Separator.Height); 402headerBarRectangle.Height = Math.Max(2 * WorkflowTheme.CurrentTheme.AmbientTheme.Margin.Height + base.textSize.Height, MinHeaderBarHeight); 433bounds.Height = Math.Max(bounds.Height, rootDesigner.Size.Height - rootDesigner.TitleHeight - rootDesigner.OptimalHeight); 440bounds.Height = Math.Max(minHeight, bounds.Height);
AuthoringOM\Design\StructuredCompositeActivityDesigner.cs (3)
167minimumSize.Width = Math.Max(minimumSize.Width, 160); 168minimumSize.Height = Math.Max(minimumSize.Height, 160); 564containerSize.Width = Math.Max(containerSize.Width, activeDesigner.Size.Width);
AuthoringOM\Design\WorkflowLayouts.cs (24)
88return new Size(Math.Max(totalSize.Width, clientSize.Width), Math.Max(totalSize.Height, clientSize.Height)); 223return new Size(Math.Max(totalSize.Width, clientSize.Width), Math.Max(totalSize.Height, clientSize.Height)); 321totalSize.Width = Math.Max(totalSize.Width, layoutExtent.Width); 322totalSize.Height = Math.Max(totalSize.Height, layoutExtent.Height); 323return new Size(Math.Max(0, (totalSize.Width - layoutExtent.Width) / 2), Math.Max(0, (totalSize.Height - layoutExtent.Height) / 2)); 390alignment.X = Math.Max(alignment.X, selectionSize.Width + selectionSize.Width / 2); 394alignment.Y = Math.Max(alignment.Y, selectionSize.Height + selectionSize.Height / 2); 741printableArea.Width = Math.Max(printableArea.Width, 1); 742printableArea.Height = Math.Max(printableArea.Height, 1); 782viewablePageSize.Width = Math.Max(viewablePageSize.Width, 1); 783viewablePageSize.Height = Math.Max(viewablePageSize.Height, 1); 789this.rowColumns.Width = Math.Max(1, this.rowColumns.Width); 794this.rowColumns.Height = Math.Max(1, this.rowColumns.Height); 829size.Width = Math.Max(paperSize.Height, 1); 830size.Height = Math.Max(paperSize.Width, 1); 834size.Width = Math.Max(paperSize.Width, 1); 835size.Height = Math.Max(paperSize.Height, 1); 860Margins adjustedMargins = new Margins(Math.Max(margins.Left, hardMargins.Left), 861Math.Max(margins.Right, hardMargins.Right), 862Math.Max(margins.Top, hardMargins.Top), 863Math.Max(margins.Bottom, hardMargins.Bottom));
AuthoringOM\Design\WorkflowPrinting.cs (16)
122Margins margins = new Margins(Math.Max(printPageArg.PageSettings.Margins.Left, hardMargins.Left), 123Math.Max(printPageArg.PageSettings.Margins.Right, hardMargins.Right), 124Math.Max(printPageArg.PageSettings.Margins.Top, hardMargins.Top), 125Math.Max(printPageArg.PageSettings.Margins.Bottom, hardMargins.Bottom)); 220Point dpi = new Point(Math.Max(NativeMethods.GetDeviceCaps(hDC, NativeMethods.LOGPIXELSX), 1), Math.Max(NativeMethods.GetDeviceCaps(hDC, NativeMethods.LOGPIXELSY), 1)); 322Margins margins = new Margins(Math.Max(printPageArg.PageSettings.Margins.Left, hardMargins.Left), 323Math.Max(printPageArg.PageSettings.Margins.Right, hardMargins.Right), 324Math.Max(printPageArg.PageSettings.Margins.Top, hardMargins.Top), 325Math.Max(printPageArg.PageSettings.Margins.Bottom, hardMargins.Bottom)); 327printableArea.Width = Math.Max(printableArea.Width, 1); 328printableArea.Height = Math.Max(printableArea.Height, 1); 347this.totalPrintablePages.X = Math.Max(this.totalPrintablePages.X, 1); 349this.totalPrintablePages.Y = Math.Max(this.totalPrintablePages.Y, 1); 360this.workflowAlignment.X = Math.Max(this.workflowAlignment.X, selectionSize.Width + selectionSize.Width / 2); 361this.workflowAlignment.Y = Math.Max(this.workflowAlignment.Y, selectionSize.Height + selectionSize.Height / 2);
AuthoringOM\Design\WorkflowView.cs (11)
447viewPortSize.Height = Math.Max(0, viewPortSize.Height - HScrollBar.Height); 449viewPortSize.Width = Math.Max(0, viewPortSize.Width - VScrollBar.Width); 467value.X = Math.Max(value.X, hScrollBar.Minimum); 475value.Y = Math.Max(value.Y, vScrollBar.Minimum); 946Zoom = Math.Min(Math.Max(newZoom, AmbientTheme.MinZoom), AmbientTheme.MaxZoom); 1034this.viewPortBitmap = new Bitmap(Math.Max(1, ViewPortSize.Width), Math.Max(1, ViewPortSize.Height), e.Graphics); 1273hScrollBar.Bounds = new Rectangle(0, Math.Max(0, Height - SystemInformation.HorizontalScrollBarHeight), Math.Max(Width - ((vScrollBar.Visible) ? SystemInformation.VerticalScrollBarWidth : 0), 0), SystemInformation.HorizontalScrollBarHeight); 1276vScrollBar.Bounds = new Rectangle(Math.Max(0, Width - SystemInformation.VerticalScrollBarWidth), 0, SystemInformation.VerticalScrollBarWidth, Math.Max(Height - ((hScrollBar.Visible) ? SystemInformation.HorizontalScrollBarHeight : 0), 0));
AuthoringOM\Serializer\ActivityCodeDomSerializer.cs (1)
55statement.LinePragma = new CodeLinePragma((string)rootActivity.GetValue(ActivityCodeDomSerializer.MarkupFileNameProperty), Math.Max((int)activity.GetValue(ActivityMarkupSerializer.StartLineProperty), 1));
AuthoringOM\Serializer\ActivityTypeCodeDomSerializer.cs (1)
126field.LinePragma = new CodeLinePragma((string)rootActivity.GetValue(ActivityCodeDomSerializer.MarkupFileNameProperty), Math.Max((int)activity.GetValue(ActivityMarkupSerializer.StartLineProperty), 1));
AuthoringOM\Serializer\FormatterServicesNoSerializableCheck.cs (1)
199Type[] tempParentTypes = new Type[Math.Max(parentTypeCount * 2, 12)];
Shared\XomlSerializationHelpers.cs (5)
177codeSegment.LinePragma = new CodeLinePragma(fileName, Math.Max(lineNumber - 1, 1)); 337activityTypeDeclaration.LinePragma = new CodeLinePragma((string)rootActivity.GetValue(ActivityCodeDomSerializer.MarkupFileNameProperty), Math.Max((int)rootActivity.GetValue(ActivityMarkupSerializer.StartLineProperty), 1)); 355constructor.LinePragma = new CodeLinePragma((string)rootActivity.GetValue(ActivityCodeDomSerializer.MarkupFileNameProperty), Math.Max((int)rootActivity.GetValue(ActivityMarkupSerializer.StartLineProperty), 1)); 358method.LinePragma = new CodeLinePragma((string)rootActivity.GetValue(ActivityCodeDomSerializer.MarkupFileNameProperty), Math.Max((int)rootActivity.GetValue(ActivityMarkupSerializer.StartLineProperty), 1)); 373codeNamespaceImport.LinePragma = new CodeLinePragma((string)rootActivity.GetValue(ActivityCodeDomSerializer.MarkupFileNameProperty), Math.Max((int)rootActivity.GetValue(ActivityMarkupSerializer.StartLineProperty), 1));
System.Xml (3)
System\Xml\BinaryXml\SqlUtils.cs (1)
204bNewPrec = (byte)(Math.Min(NUMERIC_MAX_PRECISION, Math.Max(1, lAdjust + m_bPrec)));
System\Xml\Dom\XmlCharacterData.cs (2)
122count = Math.Max ( len - offset, 0); 147count = Math.Max ( len - offset, 0);
UIAutomationClientsideProviders (10)
MS\Internal\AutomationProxies\WindowsEditBox.cs (2)
404clientLocation.x = Math.Max(clientLocation.x, clientRect.left); 406clientLocation.y = Math.Max(clientLocation.y, clientRect.top);
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (6)
141End = Math.Min(Math.Max(End, Start + 1), text.Length); 175End = Math.Min(Math.Max(End, Start + 1), text.Length); 495Math.Max(0, _provider.LineFromChar(End) - _provider.LinesPerPage() + 1); 707ArrayList rects = new ArrayList(Math.Max(endLine - startLine + 1, 0)); 962moved = Math.Max(count, -oneBasedIndex); 1007int actualCount = Math.Max(count, -line);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (2)
89_range.SetRange(Math.Max(charRange.Start, paraRange.Start), Math.Min(charRange.End, paraRange.End)); 184int start = Math.Max(_range.Start, visibleRange.Start);
WindowsBase (7)
Base\MS\Internal\IO\Packaging\CompoundFile\CompoundFileDeflateTransform.cs (1)
364size = Math.Max(size, buffer.Length + (buffer.Length >> 1)); // fast Length * 1.5
Base\MS\Internal\IO\Packaging\CompoundFile\RightsManagementEncryptedStream.cs (2)
813clearTextBuffer = new byte[Math.Max(0x1000, totalByteCount)]; 890_randomBuffer = new byte[Math.Max(16, count)]; // current block size is 16
Shared\MS\Utility\FrugalList.cs (1)
1610int newCapacity = Math.Max(newCount + (newCount >> 2), MINSIZE);
Shared\MS\Utility\ItemList.cs (2)
110T[] newList = new T[Math.Max(List.Length * 2, Count + delta)]; 117List = new T[Math.Max(delta, 2)];
Shared\MS\Win32\HandleCollector.cs (1)
178handleCount = Math.Max(0, handleCount);