New to Telerik UI for WinFormsStart a free 30-day trial

Getting Started with WinForms WaitingBar

Updated over 6 months ago

This tutorial will help you to quickly get started using the control.

Adding Telerik Assemblies Using NuGet

To use RadWaitingBar when working with NuGet packages, install the Telerik.UI.for.WinForms.AllControls package. The package target framework version may vary.

Read more about NuGet installation in the Install using NuGet Packages article.

With the 2025 Q1 release, the Telerik UI for WinForms has a new licensing mechanism. You can learn more about it here.

Adding Assembly References Manually

When dragging and dropping a control from the Visual Studio (VS) Toolbox onto the Form Designer, VS automatically adds the necessary assemblies. However, if you're adding the control programmatically, you'll need to manually reference the following assemblies:

  • Telerik.Licensing.Runtime
  • Telerik.WinControls
  • Telerik.WinControls.UI
  • TelerikCommon

The Telerik UI for WinForms assemblies can be install by using one of the available installation approaches.

Defining the RadWaitingBar

  • To add a RadWaitingBar to your form, drag a RadWaitingBar from the toolbox onto the surface of the form designer.

  • To programmatically add a RadWaitingBar to a form, create a new instance of a RadWaitingBar, and add it to the form Controls collection.

Adding a RadWaitingBar at runtime

C#
RadWaitingBar radWaitingBar = new RadWaitingBar();
radWaitingBar.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.Dash;
radWaitingBar.WaitingDirection = ProgressOrientation.Left;
this.Controls.Add(radWaitingBar);

The following tutorial illustrates how to start and stop the animation of RadWaitingBar:

1. Place a RadWaitingBar control and a RadButton control on a form.

2. Select the RadWaitingBar control.

3. In the Properties window set the WaitingDirection property to Bottom.

4. Resize the RadWaitingBar so that its height is larger than its width.

5. Select the RadButton control.

6. Set the Text property to Start.

7. In the Properties window click the events button.

8. Double-click the Click event.

9. Replace the automatically-generated event handler with this code:

RadButton's Click event handler

C#
private void radButton1_Click(object sender, EventArgs e)
{
    if (radWaitingBar1.IsWaiting)
    {
        radWaitingBar1.StopWaiting();
        this.radButton1.Text = "Start";
    }
    else
    {
        radWaitingBar1.StartWaiting();
        this.radButton1.Text = "Stop";
    }
}

10. Press F5 to run the project.

11. Click the Start button to start and stop the animation.

WinForms RadWaitingBar Start Stop Animation

Adding Indicator Elements programmatically

The following example demonstrates how to add DotsLineWaitingBarIndicatorElements in a RadWaitingBar with WaitingBarStyles.DotsSpinner:

WinForms RadWaitingBar Adding Indicator Elements programmatically

C#
RadWaitingBar radWaitingBar1 = new RadWaitingBar();
radWaitingBar1.Size = new System.Drawing.Size(200, 200);
radWaitingBar1.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.DotsSpinner;
radWaitingBar1.StartWaiting();
int radius = 20;
int elementCount = 5;
for (int i = 0; i < 4; i++)
{
    radius += 10;
    elementCount += 1;
    DotsSpinnerWaitingBarIndicatorElement dsi = new DotsSpinnerWaitingBarIndicatorElement();
    radWaitingBar1.WaitingIndicators.Add(dsi);
    dsi.Radius = radius;
    dsi.ElementCount = elementCount;
    dsi.RotationDirection = (RotationDirection)(i % 2);
}
DotsLineWaitingBarIndicatorElement dli = new DotsLineWaitingBarIndicatorElement();
radWaitingBar1.WaitingIndicators.Add(dli);
dli.PositionOffset = new SizeF(0, 50);
DotsLineWaitingBarIndicatorElement dli1 = new DotsLineWaitingBarIndicatorElement();
radWaitingBar1.WaitingIndicators.Add(dli1);
dli1.WaitingDirection = Telerik.WinControls.ProgressOrientation.Left;
dli1.PositionOffset = new SizeF(0, -50);
DotsLineWaitingBarIndicatorElement dli2 = new DotsLineWaitingBarIndicatorElement();
radWaitingBar1.WaitingIndicators.Add(dli2);
dli2.WaitingDirection = Telerik.WinControls.ProgressOrientation.Bottom;
dli2.PositionOffset = new SizeF(50, 0);
DotsLineWaitingBarIndicatorElement dli4 = new DotsLineWaitingBarIndicatorElement();
radWaitingBar1.WaitingIndicators.Add(dli4);
dli4.WaitingDirection = Telerik.WinControls.ProgressOrientation.Top;
dli4.PositionOffset = new SizeF(-50, 0);
radWaitingBar1.Location = new Point(10, 10);
this.Controls.Add(radWaitingBar1);
radWaitingBar1.StartWaiting();

See Also

Telerik UI for WinForms Learning Resources