How to simply change the BusyIndicator progress bar color to a different color

Sep 8, 2011 at 10:08 PM

This may be a dumb question, but I'm looking to use the BusyIndicator control straight out of the box with one small change.  I want to change the color of the progress bar from green to blue.  How do I do this? 

Sep 8, 2011 at 10:10 PM

You can create a style for the progress bar:

<extToolkit:BusyIndicator.ProgressBarStyle>
     <Style TargetType="ProgressBar">
          <Setter Property="Visibility" Value="Collapsed"/>
     </Style>
</extToolkit:BusyIndicator.ProgressBarStyle>

Sep 9, 2011 at 9:31 PM

What style do I need to set for it?  Seems like all I should have to do is set a style that dictates the color but I can't find anywhere that tells me what that property is and what other things I need to set along with it so that the progress bar doesn't disapear.

Sep 9, 2011 at 9:45 PM

You need something similar to this:

<extToolkit:BusyIndicator.ProgressBarStyle>
     <Style TargetType="ProgressBar" >
          <Setter Property="IsIndeterminate" Value="True"/>
          <Setter Property="Height" Value="15"/>
          <Setter Property="Margin" Value="8,0,8,8"/>
          <Setter Property="Foreground" Value="Red" />
     </Style>
</extToolkit:BusyIndicator.ProgressBarStyle>

 

Sep 9, 2011 at 11:34 PM

thanks that was what I was missing.