views:

3430

answers:

2

In Winforms I could set the ProgressBarStyle of a progress bar to Marqee, and that would have the progress bar incriment on its own without having to be set, for processes where I don't know how long its going to take, and no good way to report back to the UI.

I would like to do the same in WPF, but I can't find a way to pull it off short of hosting a winform progress bar, which seems counter productive.

How can I pull this off in WPF? Do I have to host a winform progress bar?

+7  A: 

I think you simply want to set the IsIndeterminate property of the ProgressBar to true. (See this article, which also has a nice example of a fancy circular progress indicator.)

Noldorin
+6  A: 

Try the following

<ProgressBar 
  IsIndeterminate="True"
  Orientation="Horizontal" />

The key is the oddly named IsIndeterminate attribute. Setting this to true means Marque

JaredPar
You both rock! I have Noldorin the answer because he has less points than you though. :) He also answerd 3 seconds faster.
Russ
@Russ but, but, but I spent 3 seconds making my answer pretty :). Don't mind at all. Glad to help
JaredPar
Three seconds... indeed that was close - is quick typing not the key to success on SO? :P (I actually considered a code sample, but thought it probably wasn't necessary for a single property). Cheers, Russ.
Noldorin
@Noldorin, I'll get you next time ;)
JaredPar
For the record "Marque" is oddly named, IsIndeterminate is correctly name, it is very precise and is used in multiple languages. While the many definitions of marque none of them really mean any about having progress that you do not know when it will end (Indeterminate).
Rodney Foley