How to override animation in wpf progress bar in indeterminate state?
-
I have overridden the control template for a ProgressBar by changing the style of the PART_Track and PART_Indicator parts of it, but I have no clue how to override the animation that's taking place when a progressbar's IsIndeterminate property is set. Does anyone know if it's overridable at all, and if so, how? Regards, Øyvind.
-
I have overridden the control template for a ProgressBar by changing the style of the PART_Track and PART_Indicator parts of it, but I have no clue how to override the animation that's taking place when a progressbar's IsIndeterminate property is set. Does anyone know if it's overridable at all, and if so, how? Regards, Øyvind.
I am not sure, did you try BackgroundWorker, progressReport() ?
Charith Jayasundara
-
I am not sure, did you try BackgroundWorker, progressReport() ?
Charith Jayasundara
Charith Jayasundara wrote:
I am not sure, did you try BackgroundWorker, progressReport() ?
No, not in this case anyway. I don't think it would work, since the animation should go on even if no progress was reported from the background worker at all until it finished. Anyway, I think I have found a solution on my own. Here it is, if anyone else needs to do the same: I used Expression Blend to examine the source xaml code for the default ProgressBar control template, and found that it uses a ProgressBarBrushConverter to return a Brush based on some input values. With some googling I found this[^]">, which basically disassembles the ProgressBarBrushConverter.Convert method. Then I was able to make my own BrushConverter : IMultiValueConverter to use. Regards, Øyvind