Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. How to override animation in wpf progress bar in indeterminate state?

How to override animation in wpf progress bar in indeterminate state?

Scheduled Pinned Locked Moved WPF
csharpwpftutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    oyvindpe
    wrote on last edited by
    #1

    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.

    C 1 Reply Last reply
    0
    • O oyvindpe

      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.

      C Offline
      C Offline
      Charith Jayasundara
      wrote on last edited by
      #2

      I am not sure, did you try BackgroundWorker, progressReport() ?

      Charith Jayasundara

      O 1 Reply Last reply
      0
      • C Charith Jayasundara

        I am not sure, did you try BackgroundWorker, progressReport() ?

        Charith Jayasundara

        O Offline
        O Offline
        oyvindpe
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups