windowsforms-devexpress-dot-xtraeditors-dot-progressbarcontrol.md
Gets or sets the progress bar position.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Bindable(false)]
[DefaultValue(0)]
[DXCategory("Appearance")]
public virtual int Position { get; set; }
<DXCategory("Appearance")>
<DefaultValue(0)>
<Bindable(False)>
Public Overridable Property Position As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | 0 |
The progress bar’s current position.
|
The Position property specifies the progress that the application has made toward completing a specific operation. The available range of values the Position property can accept is determined by the RepositoryItemProgressBar.Minimum and RepositoryItemProgressBar.Maximum properties.
There are a number of ways to modify the value displayed by the ProgressBarControl other than changing the Position property directly. You can use the RepositoryItemProgressBar.Step property to specify a value to increment the Position property by, and then call the ProgressBarControl.PerformStep method. You can also use the ProgressBarControl.Increment and ProgressBarControl.Decrement methods to correspondingly increase and decrease the progress bar’s position by a specified value.
Changing the Position property value at runtime raises the RepositoryItem.EditValueChanging and RepositoryItem.EditValueChanged events.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Position property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-scheduler-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Form1.cs#L40
this.progressBarControl1.Properties.Maximum = timeBeforeAlert;
this.progressBarControl1.Position = timeBeforeAlert;
this.progressBarControl1.Properties.Step = -1;
winforms-splash-screen-send-commands/CS/SplashScreen1.cs#L23
int pos = (int)arg;
progressBarControl1.Position = pos;
}
winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Form1.vb#L42
Me.progressBarControl1.Properties.Maximum = timeBeforeAlert
Me.progressBarControl1.Position = timeBeforeAlert
Me.progressBarControl1.Properties.Step = -1
winforms-splash-screen-send-commands/VB/SplashScreen1.vb#L21
Dim pos As Integer = CInt(arg)
progressBarControl1.Position = pos
End If
See Also