Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
my progress bar colors are very light! This happened when i converted my expression blend 3 project to expression blend 4!

The opacity is a 100%. I think there is a silverish animation over the progress bars in blend 4. I am just starting with wpf and don't know how to override this style.. i think there is a way to change how the foreground fills in the progress bar.

right now i have this

XML
<progressbar x:name="Pbar2" margin="82,80,30,0" verticalalignment="Top" height="16" foreground="Red" valuechanged="UpdateTextBlock2" borderbrush="{x:Null}" removed="{x:Null}" xmlns:x="#unknown" />


but the red color is very light..there is a silverish glow over it which makes it light..and also there is a animation type thing that goes on in a progress bar..that small glow that keeps moving inside..Is there any way to disable that as well?
thank you for ur help!!
Posted
Updated 27-Jan-11 6:34am
v2

1 solution

You can setup a template for the progressbar. Here is some code from a Microsoft example page.

http://msdn.microsoft.com/en-us/magazine/cc163497.aspx#S4[^]

XML
<ProgressBar Margin="50" HorizontalAlignment="Center"
             Value="{Binding ElementName=scroll, Path=Value}">
    <ProgressBar.Template>
        <ControlTemplate>
            <StackPanel>
                <Rectangle Name="PART_Track"
                           Height="20" Width="300" Fill="Red" />

                <Rectangle Name="PART_Indicator"
                           Height="20" Fill="Blue" />
            </StackPanel>
        </ControlTemplate>
    </ProgressBar.Template>
</ProgressBar>
 
Share this answer
 
Comments
Espen Harlinn 27-Jan-11 15:57pm    
5+ Nice link, Charles Petzold's article is as usually good :)
Steve Maier 27-Jan-11 16:20pm    
Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900