Skip to content

Commit

Permalink
Fix brushes for MetroProgressBar
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Jul 5, 2017
1 parent 68e502c commit 2c97fd4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@

<Label Content="MetroProgressBar" Style="{DynamicResource DescriptionHeaderStyle}" />
<Controls:MetroProgressBar Width="200"
Height="15"
Margin="0 10 0 0"
Foreground="{DynamicResource AccentColorBrush}"
Maximum="100"
Minimum="0"
Value="{Binding ElementName=horizSlider, Path=Value}" />
Expand All @@ -202,7 +202,6 @@
<Controls:MetroProgressBar x:Name="IsIndeterminatePB"
Width="200"
Margin="0 10 0 0"
Foreground="{DynamicResource AccentColorBrush}"
IsIndeterminate="True"
Maximum="100"
Minimum="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- ProgressBar Style -->
<Style x:Key="MetroProgressBar" TargetType="ProgressBar">
<Setter Property="Background" Value="{DynamicResource GrayBrush5}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource HighlightBrush}" />
<Setter Property="Height" Value="10" />
Expand Down
16 changes: 6 additions & 10 deletions src/MahApps.Metro/MahApps.Metro/Themes/MetroProgressBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@
xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
xmlns:System="clr-namespace:System;assembly=mscorlib">

<SolidColorBrush x:Key="ProgressBarFillBrush" Color="#FF008287" />
<SolidColorBrush x:Key="ProgressBarTrackBrush" Color="#1FFFFFFF" />
<Thickness x:Key="OutlineBorderThickness">0</Thickness>
<System:Double x:Key="ProgressBarMinHeight">6</System:Double>
<SolidColorBrush x:Key="TransparentOutlineBrush">Transparent</SolidColorBrush>

<Style TargetType="{x:Type Controls:MetroProgressBar}">
<Setter Property="Background" Value="{StaticResource ProgressBarTrackBrush}" />
<Setter Property="BorderBrush" Value="{StaticResource TransparentOutlineBrush}" />
<Setter Property="BorderThickness" Value="{StaticResource OutlineBorderThickness}" />
<Setter Property="Foreground" Value="{StaticResource ProgressBarFillBrush}" />
<Setter Property="Background" Value="#1FFFFFFF" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource HighlightBrush}" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Maximum" Value="100" />
<Setter Property="MinHeight" Value="{StaticResource ProgressBarMinHeight}" />
<Setter Property="MinHeight" Value="{DynamicResource ProgressBarMinHeight}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Controls:MetroProgressBar}">
Expand Down Expand Up @@ -273,7 +269,7 @@
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="MinWidth" Value="{StaticResource ProgressBarMinHeight}" />
<Setter Property="MinWidth" Value="{DynamicResource ProgressBarMinHeight}" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter TargetName="ContainingGrid" Property="Height" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Width}" />
<Setter TargetName="ContainingGrid" Property="LayoutTransform">
Expand Down

0 comments on commit 2c97fd4

Please sign in to comment.