-
-
Notifications
You must be signed in to change notification settings - Fork 5
Spinner
Alexandru Iuga edited this page Apr 5, 2022
·
4 revisions
Displays a progress-like visual bar that moves continuously. It can be used for background jobs for which the remaining work cannot be predicted.
- Custom label - Displays a custom text label in front (left) of the spinner.
- Optional label - The label is optional. It can be hidden.
- Visual Template - Supports templates that control the aspect of the spinner (the displayed text for each frame).
- Custom Speed - Can change the time interval by which the frames are updated, speeding up or slowing down the animation.
The Visual templates provides, for each frame the text to be displayed. It does not provide any color.
Spinner.Run(() =>
{
// Do some work here.
});
or
BubbleTemplate bubbleTemplate = new BubbleTemplate();
Spinner.Run(bubbleTemplate, () =>
{
// Do some work here.
});
StickTemplate spinnerTemplate = new StickTemplate(),
using (Spinner spinner = new Spinner(spinnerTemplate))
{
spinner.StepMiliseconds = SpinnerStepMilliseconds;
spinner.Text = "Doing some work";
spinner.Display();
// Do some work here.
spinner.Close();
}