Skip to main content
All docs
V25.1

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

StepProgressBar.ItemClick Event

Occurs when a user clicks an item in the StepProgressBar and allows you to cancel selection.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v25.1.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Action")]
public event EventHandler<StepProgressBarItemClickEventArgs> ItemClick

#Event Data

The ItemClick event's data class is StepProgressBarItemClickEventArgs. The following properties provide information specific to this event:

Property Description
Handled Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs.
IsMouseClick Gets whether the StepProgressBarItem was clicked with the mouse.
Item Gets the clicked StepProgressBarItem.
MouseClickArgs Gets an object that contains mouse click event arguments.

#Remarks

If the StepProgressBar.AllowUserInteraction property is enabled, a user can interact with StepProgressBar items as follows:

  • Click items using the mouse to select them.
  • Navigate between items using the keyboard and press Enter or Space to click an item.

WinForms - StepProgressBar User Interaction, DevExpress

Use the e.Item event parameter to identify the ‘clicked’ step item. Set the e.Handled event parameter to true to cancel selection.

The following code snippet handles the ItemClick event to prompt the user to save changes. If the user chooses to save, the selected item remains unchanged (the operation is canceled):

stepProgressBar1.AllowUserInteraction = true;
// ...
private void StepProgressBar1_ItemClick(object sender, StepProgressBarItemClickEventArgs e) {
    if (IsDataSaved(e.Item)) return;
    if (XtraMessageBox.Show("You have unsaved changes. Would you like to save them?", "Warning", MessageBoxButtons.YesNo) == DialogResult.Yes)
        e.Handled = true;
}

The following animation shows the result:

WinForms - Interactive StepProgressBar, DevExpress

See Also