Skip to main content
All docs
V25.1
  • StepProgressBar.CustomDrawItemIndicator Event

    Allows you to custom draw indicators.

    Namespace: DevExpress.XtraEditors

    Assembly: DevExpress.XtraEditors.v25.1.dll

    NuGet Package: DevExpress.Win.Navigation

    Declaration

    [DXCategory("CustomDraw")]
    public event StepProgressBarItemIndicatorCustomDrawEventHandler CustomDrawItemIndicator

    Event Data

    The CustomDrawItemIndicator event's data class is DevExpress.XtraEditors.Drawing.StepProgressBarItemIndicatorCustomDrawEventArgs.

    Remarks

    The CustomDrawItemIndicator event allows you to custom draw item indicators. The Handled event argument must be set to true for the event handler to be in effect.

    The following methods allow you to perform default rendering of the step progress bar components:

    • DefaultDraw() - Draws the entire indicator.
    • DefaultDrawFillIndicator() - Draws the indicator’s background.
    • DefaultDrawImage() - Draws the indicator’s image.
    • DefaultDrawIndicatorBorder() - Draws the indicator’s border.

    Example

    The example below handles the CustomDrawItemIndicator event to custom draw indicators. The event handler draws a rectangle around an indicator, and paints the default image inside the rectangle.

      private void stepProgressBar1_CustomDrawItemIndicator(object sender, DevExpress.XtraEditors.Drawing.StepProgressBarItemIndicatorCustomDrawEventArgs e) {
        // Draw the default image.
        e.DefaultDrawImage();
        // Custom draw a rectangle around the indicators using the thickness and color of a connector.
        e.Cache.DrawRectangle(e.IndicatorBounds, e.GetIndicatorBorderPen().Color, stepProgressBar1.ConnectorLineThickness);
        e.Handled = true;
      }
    

    CustomDraw item indicatore

    See Also