For instance, if you loop through a collected list of files while checking each of them, you can set the Minimum property to 0, the Maximum to the amount of files in your list, and then just increment as you loop through it.
In these cases, you can display an “indeterminate” progress bar by setting the Is Indeterminate property to true.
A green bar will repeatedly slide across the face of the Progress Bar to show that something is happening.
Any modern computer can do this faster than you can blink your eyes, so I've added a delay to each iteration of 100 milliseconds.
Unfortunately, as I already described, nothing will happen.
This will render the Text Block on top of the Progress Bar, which is exactly what we want here, because the Text Block has a transparent background by default.
We use a binding to make sure that the Text Block show the same value as the Progress Bar.For some tasks, expressing the progress as a percentage is not possible or you simply don't know how long it will take.For those situations, the indeterminate progress bar has been invented, where an animation lets the user know that something is happening, while indicating that the running time can't be determined.Notice the special String Format syntax, which allows us to show the value with a percentage sign postfix - it might look a bit strange, but please see the String Format article of this tutorial for more information on it.If you try to update a Progress Bar in a chunk of code that is running on the main UI thread and doing some work, the Progress Bar won’t update until all of the work is done.But we’re not allowed to update the Progress Bar from this thread because we aren’t the thread that created the control.