32

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?

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
Russ
  • 12,312
  • 20
  • 59
  • 78

2 Answers2

54

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.)

kͩeͣmͮpͥ ͩ
  • 7,783
  • 26
  • 40
Noldorin
  • 144,213
  • 56
  • 264
  • 302
44

Try the following

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

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

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
  • 1
    You both rock! I have Noldorin the answer because he has less points than you though. :) He also answerd 3 seconds faster. – Russ Mar 12 '09 at 13:44
  • 1
    @Russ but, but, but I spent 3 seconds making my answer pretty :). Don't mind at all. Glad to help – JaredPar Mar 12 '09 at 13:47
  • 1
    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 Mar 12 '09 at 16:06
  • 1
    @Noldorin, I'll get you next time ;) – JaredPar Mar 12 '09 at 17:13
  • 11
    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 S. Foley Nov 08 '09 at 19:38