#1,033 – ProgressBar Can Be Horizontal or Vertical

The ProgressBar is rendered horizontally by default, but you can orient it vertically by setting the Orientation property to Vertical.

    <StackPanel>
        <ProgressBar Value="{Binding TheProgress}"
                     Height="15" Margin="15,15,15,0"/>
        <Label Content="Doing some work..."
               Margin="10,0"/>
        <ProgressBar Value="{Binding TheProgress}"
                     Width="15" Height="100" Margin="15"
                     HorizontalAlignment="Left"
                     Orientation="Vertical"/>
        <Button Margin="15" Padding="15,3" HorizontalAlignment="Center"
            Content="Start" Click="Button_Click"/>
    </StackPanel>

1033-001

Advertisement