EDIT: I solved my issue...take a look at my answer. Correct if it's wrong. Thanks.
Question: For some reason it seems that the progress bar in a WPF app isn't showing the color I require.
Here's the XAML code:
<Window x:Class="TaskbarProgressApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.TaskbarItemInfo>
<TaskbarItemInfo />
</Window.TaskbarItemInfo>
<Grid>
<ProgressBar x:Name="ProgressBar"
Margin="10"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Height="23" Background="{x:Null}" Foreground="DarkRed">
</ProgressBar>
</Grid>
</Window>
Here's the result:
Doesn't look like Dark Red to me...happens to every color :(
Any thoughts ?
Thanks to @Merlyn Morgan-Graham and @CharithJ for pointing out the other question, I thought it was a different one when I read it.
I solved the problem and I wanted to share it.
I downloaded the Trial of MS Expression Blend and changed:
<Trigger Property="IsIndeterminate" Value="false">
<Setter Property="Background" TargetName="Animation" Value="#80B5FFA9"/>
</Trigger>
To
<Trigger Property="IsIndeterminate" Value="false">
<Setter Property="Background" TargetName="Animation" Value="#00000000"/>
</Trigger>
This gives the colors as they are:
Dark Red:
Even this works
<Trigger Property="IsIndeterminate" Value="true">
<Setter Property="Background" TargetName="Animation" Value="#80B5FFA9"/>
</Trigger>
Doesn't change the progress bar but the colors are as they should be.
It's sad that there is no option to change it directly.
Thanks for the help.
You can do this by changing the control template. Here is an article on that from MSDN. ProgressBar ControlTemplate Example
Here is another similar thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With