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.
Fortunately for us, the flexibility of WPF makes this really easy for us to accomplish.
Here's an example: We accomplish the above by putting the Progress Bar and the Text Block showing the percentage inside of the same Grid, without specifying any rows or columns.
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.