This tutorial illustrates how to start and stop the animation of RadWaitingBar.
Place a RadWaitingBar control and a RadButton control on a form.
Select the RadWaitingBar control.
In the Properties window set the WaitingDirection property to Bottom.
Resize the RadWaitingBar so that its height is larger than its width.
Select the RadButton control.
Set the Text property to Start.
In the Properties window click the events button.
Double-click the Click event.
Replace the automatically-generated event handler with this code:
Copy[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";
}
}
Copy[VB.NET]
Private Sub radButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
If RadWaitingBar1.IsWaiting Then
RadWaitingBar1.StopWaiting()
Me.RadButton1.Text = "Start"
Else
RadWaitingBar1.StartWaiting()
Me.RadButton1.Text = "Stop"
End If
End Sub
Press F5 to run the project.
Click the Start button to start and stop the animation.