-
-
Notifications
You must be signed in to change notification settings - Fork 5
ProgressBar
Alexandru Iuga edited this page Apr 5, 2022
·
5 revisions
Displays a progress bar and the associated underlying value.
- Custom label text - A custom text can be provided to be displayed in front of the control.
- Optional label text - The label text can be hidden.
- Custom value positioning - Can specify to display the underlying value at the left or right of the progress bar.
- Custom unit of measurement - A custom text can be provided to be displayed after the value.
- Custom value range - The margin of the value range can be changed using the MinValue and MaxValue properties.
- Allow values outside range - If the value to be displayed is outside the progress bar range, the closest margin is displayed instead.
- Optional value display - Can decide if the underlying value should be displayed or not.
ManualResetEventSlim finishEvent = new ManualResetEventSlim();
finishEvent.Reset();
Spinners.ProgressBar progressBar = new Spinners.ProgressBar();
Task.Run<Task>(async () =>
{
progressBar.Display();
for (int i = 0; i < 100; i++)
{
await Task.Delay(100);
progressBar.Value++;
}
finishEvent.Set();
});
finishEvent.Wait();
progressBar.Close();
Result: