System.Windows.Forms.ProgressBar.Maximum Property

Gets or sets the maximum value of the range of the control.

Syntax

[System.ComponentModel.DefaultValue(100)]
[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)]
public int Maximum { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property specifies the upper limit of the ProgressBar.Value property. When the value of the ProgressBar.Maximum property is changed, the System.Windows.Forms.ProgressBar control is redrawn to reflect the new range of the control. When the value of the ProgressBar.Value property is equal to the value of the ProgressBar.Maximum property, the progress bar is completely filled.

You can use this property to specify a value to which the ProgressBar.Value property must be set (by setting the ProgressBar.Value property or using the ProgressBar.Increment(int) or ProgressBar.PerformStep methods) to indicate that an operation is complete. For example, you can set the value of the ProgressBar.Maximum property to the total number of files in a file copy operation. Each time a file is copied, the ProgressBar.Value property can be increased by 1 until the total number of files is copied. At that point, the progress bar would be completely filled.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0