Ershad
Ershad

Reputation: 957

Progress bar hanging in wpf?

In WPF application, a progress bar is shown at the corner of the window. I want this to always run. So i have made IsIndeterminate property to true. Some prompts will come while running the application, there progress bar also hangs as UI thread hangs. But i want this progress bar to run.I have already tried with background thread also. but still i didn't work.So what to be done? Thanks in advance.

Upvotes: 0

Views: 617

Answers (1)

Peter Stephens
Peter Stephens

Reputation: 1080

You need to run your blocking operation in a background thread. This will allow animations in the UI thread to continue to function, including the "indeterminate" progress bar animation.

If you block the UI thread, animation will be suspended.

Also, it is not possible to have the progress bar in its own thread. There is only one UI thread per top level window.

Upvotes: 1

Related Questions