39 writes to Maximum
System.Windows.Forms (8)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
4547_vertScrollBar.Maximum = totalVisibleHeight - totalVisibleFrozenHeight; 10318_horizScrollBar.Maximum = totalVisibleWidth - totalVisibleFrozenWidth; 10338_horizScrollBar.Maximum = 1; 10360_vertScrollBar.Maximum = totalVisibleHeight - totalVisibleFrozenHeight; 10382_vertScrollBar.Maximum = 1; 14974_vertScrollBar.Maximum = totalVisibleHeight - totalVisibleFrozenHeight;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
4821ScrollBar.Maximum = Math.Max(0, TotalProperties - 1);
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
874scrollBar.Maximum = virtualDimension;
System.Windows.Forms.Design (3)
System\ComponentModel\Design\ByteViewer.cs (3)
485_scrollBar.Maximum = _linesCount - 1; 494_scrollBar.Maximum = _rowCount; 572_scrollBar.Maximum = _linesCount - 1;
System.Windows.Forms.Tests (26)
System\Windows\Forms\AccessibleObjects\HScrollBar.HScrollBarAccessibleObjectTests.cs (1)
278Maximum = maximum,
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarFirstLineButtonAccessibleObjectTests.cs (1)
340Maximum = maximum,
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarFirstPageButtonAccessibleObjectTests.cs (1)
378Maximum = maximum,
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarLastLineButtonAccessibleObjectTests.cs (1)
350Maximum = maximum,
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarLastPageButtonAccessibleObjectTests.cs (1)
365Maximum = maximum,
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarThumbAccessibleObjectTests.cs (1)
270Maximum = maximum,
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarFirstLineButtonAccessibleObjectTests.cs (1)
324Maximum = maximum,
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarFirstPageButtonAccessibleObjectTests.cs (1)
362Maximum = maximum,
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarLastLineButtonAccessibleObjectTests.cs (1)
334Maximum = maximum,
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarLastPageButtonAccessibleObjectTests.cs (1)
349Maximum = maximum,
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarThumbAccessibleObjectTests.cs (1)
270Maximum = maximum,
System\Windows\Forms\AccessibleObjects\VScrollBar.VScrollBarAccessibleObjectTests.cs (1)
266Maximum = maximum,
System\Windows\Forms\ScrollBarTests.cs (14)
604Maximum = 105, 709Maximum = 10, 716control.Maximum = 15; 835Maximum = value 845control.Maximum = value; 870control.Maximum = value; 892control.Maximum = value; 933control.Maximum = value; 955control.Maximum = value; 985Maximum = 5 1000Maximum = -1 1169Maximum = 8, 3111vScrollBar.Maximum = maximum; 3130hScrollBar.Maximum = maximum;
WinFormsControlsTest (2)
ScrollBars.cs (2)
17hScrollBar.Maximum = decimal.ToInt32(numericMaximum.Value); 18vScrollBar.Maximum = decimal.ToInt32(numericMaximum.Value);
68 references to Maximum
System.Windows.Forms (43)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
4094if (value > _vertScrollBar.Maximum - fittingTrailingScrollingRowsHeight) 4096value = _vertScrollBar.Maximum - fittingTrailingScrollingRowsHeight;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (13)
4545int oldThumbHeight = Math.Max(((_vertScrollBar.Height - 2 * SystemInformation.VerticalScrollBarArrowHeight) * _vertScrollBar.LargeChange) / _vertScrollBar.Maximum, 8); 4548Debug.Assert(_vertScrollBar.Maximum > 0); 4556(_vertScrollBar.Height - 2 * SystemInformation.VerticalScrollBarArrowHeight) * _vertScrollBar.LargeChange / _vertScrollBar.Maximum, 8576|| _vertScrollBar.Maximum == visibleRowsHeight - frozenVisibleRowsHeight); 10319Debug.Assert(_horizScrollBar.Maximum > 0); 10361Debug.Assert(_vertScrollBar.Maximum > 0); 16574<= _vertScrollBar.Maximum - ComputeHeightOfFittingTrailingScrollingRows(totalVisibleFrozenHeight)) 16585> _vertScrollBar.Maximum - ComputeHeightOfFittingTrailingScrollingRows(totalVisibleFrozenHeight)) 16605extremeScrollBarValue = _horizScrollBar.Maximum; 17161int newHorizontalOffset = _horizScrollBar.Maximum - _horizScrollBar.LargeChange - dataGridViewColumn.Thickness; 28422_vertScrollBar.Maximum - ComputeHeightOfFittingTrailingScrollingRows(totalVisibleFrozenHeight)) 28462if (se.NewValue >= _vertScrollBar.Maximum - _vertScrollBar.LargeChange) 28465VerticalOffset = _vertScrollBar.Maximum - ComputeHeightOfFittingTrailingScrollingRows(totalVisibleFrozenHeight);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (3)
2070|| newValue > ScrollBar.Maximum 3224if (_scrollBar!.Value > (_scrollBar.Maximum - _visibleRows + 1)) 4234if (newOffset >= ScrollBar.Minimum && newOffset < ScrollBar.Maximum)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridPositionData.cs (2)
44else if (delta > gridView.ScrollBar.Maximum) 46delta = gridView.ScrollBar.Maximum - 1;
System\Windows\Forms\Printing\PrintPreviewControl.cs (6)
764_hScrollBar.Value = Math.Clamp(value.X, _hScrollBar.Minimum, _hScrollBar.Maximum); 765_vScrollBar.Value = Math.Clamp(value.Y, _vScrollBar.Minimum, _vScrollBar.Maximum); 953maxPos = vertical ? _vScrollBar.Maximum : _hScrollBar.Maximum; 1018maxPos = _vScrollBar.Maximum - _vScrollBar.SmallChange; 1056maxPos = _hScrollBar.Maximum - _hScrollBar.SmallChange;
System\Windows\Forms\Printing\PrintPreviewControl.PrintPreviewControlAccessibleObject.cs (12)
109owner._hScrollBar.Value = (scrollValue > owner._hScrollBar.Maximum ? owner._hScrollBar.Maximum : scrollValue); 113owner._hScrollBar.Value = (scrollValue > owner._hScrollBar.Maximum ? owner._hScrollBar.Maximum : scrollValue); 132owner._vScrollBar.Value = (scrollValue > owner._vScrollBar.Maximum ? owner._vScrollBar.Maximum : scrollValue); 136owner._vScrollBar.Value = (scrollValue > owner._vScrollBar.Maximum ? owner._vScrollBar.Maximum : scrollValue); 162scrollValue = owner._hScrollBar.Minimum + (int)((owner._hScrollBar.Maximum - owner._hScrollBar.Minimum) * horizontalPercent); 168scrollValue = owner._vScrollBar.Minimum + (int)((owner._vScrollBar.Maximum - owner._vScrollBar.Minimum) * verticalPercent); 181double percent = owner._hScrollBar.Value * 100.0 / (owner._hScrollBar.Maximum - owner._hScrollBar.LargeChange); 195double percent = owner._vScrollBar.Value * 100.0 / (owner._vScrollBar.Maximum - owner._vScrollBar.LargeChange);
System\Windows\Forms\Scrolling\ScrollBar.cs (2)
363throw new ArgumentOutOfRangeException(nameof(value), string.Format(SR.InvalidBoundArgument, nameof(Value), value, $"'{nameof(Minimum)}'", $"'{nameof(Maximum)}'")); 594return $"{s}, Minimum: {Minimum}, Maximum: {Maximum}, Value: {Value}";
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarAccessibleObject.cs (2)
44internal int UIMaximum => this.TryGetOwnerAs(out ScrollBar? owner) ? owner.Maximum - owner.LargeChange + 1 : 0; 165internal override double Maximum => this.TryGetOwnerAs(out ScrollBar? owner) ? owner.Maximum : base.Maximum;
System\Windows\Forms\Scrolling\ScrollEventType.cs (1)
52/// The scroll box was moved to the <see cref="ScrollBar.Maximum"/>
System.Windows.Forms.Tests (25)
System\Windows\Forms\HScrollBarTests.cs (1)
86Assert.Equal(100, control.Maximum);
System\Windows\Forms\ScrollBarTests.cs (23)
76Assert.Equal(100, control.Maximum); 837Assert.Equal(value, control.Maximum); 846Assert.Equal(value, control.Maximum); 871Assert.Equal(value, control.Maximum); 893Assert.Equal(value, control.Maximum); 934Assert.Equal(value, control.Maximum); 956Assert.Equal(value, control.Maximum); 987Assert.Equal(5, control.Maximum); 1002Assert.Equal(-1, control.Maximum); 1021Assert.Equal(100, control.Maximum); 1030Assert.Equal(100, control.Maximum); 1057Assert.Equal(100, control.Maximum); 1079Assert.Equal(100, control.Maximum); 1120Assert.Equal(100, control.Maximum); 1142Assert.Equal(100, control.Maximum); 1172Assert.Equal(12, control.Maximum); 1567Assert.Equal(100, control.Maximum); 1576Assert.Equal(100, control.Maximum); 1602Assert.Equal(100, control.Maximum); 1624Assert.Equal(100, control.Maximum); 1666Assert.Equal(100, control.Maximum); 1688Assert.Equal(100, control.Maximum); 1752string expectedMessage = new ArgumentOutOfRangeException(paramName, string.Format(SR.InvalidBoundArgument, nameof(control.Value), value, $"'{nameof(control.Minimum)}'", $"'{nameof(control.Maximum)}'")).Message;
System\Windows\Forms\VScrollBarTests.cs (1)
85Assert.Equal(100, control.Maximum);