Ribbon for WinForms | ComponentOne
Elements / Ribbon Items / Progress Bar
In This Topic
    Progress Bar
    In This Topic

    A Progress Bar is a C1Ribbon Item used to visualize the progression of an extended task occurring within an application. The user can assign Minimum, Maximum and Value properties to the ProgressBar range.

    The image below depicts a Progress Bar with a Minimum and Maximum of 0 and 100 respectively. The current Value is shown as 50 here, indicating that the task is partly completed.

    Progress bar

    Adding Progress Bar at Design-Time

    The Ribbon Progress Bar can be added at design-time using the Ribbon Group Floating Toolbar or RibbonGroup Items Collection Editor. Also, you can customize the look of the RibbonProgressBar using the Ribbon Progress Bar Floating ToolBar or by editing the properties in the Properties Window. For more information about floating toolbars, refer this topic.

    This image below shows the floating toolbar of ProgressBar.

    Floating toolbar

    Adding ProgressBar via Code

    A ProgressBar can also be added to the C1Ribbon control through the code using the RibbonProgressBar class. This is depicted in the code below:

    ' Add ProgressBar ribbon item
    Dim progressBar As RibbonProgressBar = New RibbonProgressBar()
    progressBar.Minimum = 0
    progressBar.Maximum = 100
    progressBar.Value = 50
    formatGroup.Items.Add(progressBar)
    
    // Add Progress Bar ribbon item
    RibbonProgressBar progressBar = new RibbonProgressBar();
    progressBar.Minimum = 0;
    progressBar.Maximum = 100;
    progressBar.Value = 50;
    progressBar.ToolTip = "50%";
    formatGroup.Items.Add(progressBar);