Vertical Not So SimpleProgressBar
-
I am trying to create an app with a progress bar styled from Blend's SimpleProgressBar such that Part_Indicator grows vertically toward the top of the screen as progress value increases. Problem is that Blend's SimpleProgressBar Part_Indicator dissapears when Orientation="Vertical"! The default Progress Bar works fine. Blend's SimpleProgressBar also works fine with Orientation="Horizontal". Comparing SimpleProgressBar to the default style for Progress bar revealed a control template trigger was missing from SimpleProgressBar for when Orientation="Vertical". I added it as follows but the PART_Indicator does not rotate. Are borders rotatable? It is probably something simple that is missing.
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="LackOfProgress.Window1" Title="Window1" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"> <Window.Resources> <LinearGradientBrush x:Key="PressedBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#BBB" Offset="0.0"/> <GradientStop Color="#EEE" Offset="0.1"/> <GradientStop Color="#EEE" Offset="0.9"/> <GradientStop Color="#FFF" Offset="1.0"/> </LinearGradientBrush> <SolidColorBrush x:Key="SolidBorderBrush" Color="#888"/> <LinearGradientBrush x:Key="NormalBorderBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#CCC" Offset="0.0"/> <GradientStop Color="#444" Offset="1.0"/> </LinearGradientBrush> <LinearGradientBrush x:Key="MouseOverBrush" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#FFF" Offset="0.0"/> <GradientStop Color="#AAA" Offset="1.0"/> </LinearGradientBrush> <Style x:Key="SimpleProgessBar" TargetType="{x:Type ProgressBar}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ProgressBar}"> <Grid> <Border x:Name="PART_Track" Background="{DynamicResource PressedBrush}" BorderBrush="{DynamicResource SolidBorderBrush}" BorderThickness="1" CornerRadius="2"/> <Border HorizontalAlignment="Left" x:Name="PART_Indicator" Background="{DynamicResource MouseOverBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" BorderThickness