Page 1 of 1

ProgressBar Orientation doesn't work?

Posted: 27 Jun 2016, 15:39
by Verfin
From the samples folder, I changed the
<ProgressBar Grid.Column="1" Width="150" Height="18" Value="50">
into
<ProgressBar Orientation="Vertical" Grid.Column="1" Width="150" Height="18" Value="50">
and tried the file in the xaml player, but nothing changes. The progress bar still progresses from right to left.

Is this bug, or am I once again missing something?

Re: ProgressBar Orientation doesn't work?

Posted: 28 Jun 2016, 18:00
by sfernandez
Hi,

If you are using the default ProgressBar style provided by Noesis, I'm afraid to say that its template is not yet prepared to show in Vertical Orientation. We will improve this in a future release though.

Meanwhile you can write your own ProgressBar template as follows to support vertical orientation:
<ControlTemplate TargetType="{x:Type ProgressBar}">
    <Grid x:Name="TemplateRoot" MinHeight="{TemplateBinding MinHeight}">
        <Border x:Name="PART_Track"
            Background="{TemplateBinding Background}" 
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="{TemplateBinding BorderThickness}"
            CornerRadius="1"/>
        <Grid x:Name="PART_Indicator"
            HorizontalAlignment="Left">
            <Border x:Name="IndicatorBorder"
                Margin="{TemplateBinding Padding}"
                Background="{TemplateBinding Foreground}"/>
        </Grid>
    </Grid>
    <ControlTemplate.Triggers>
        <Trigger Property="Orientation" Value="Vertical">
            <Setter Property="LayoutTransform" TargetName="TemplateRoot">
                <Setter.Value>
                    <RotateTransform Angle="-90"/>
                </Setter.Value>
            </Setter>
        </Trigger>
    </ControlTemplate.Triggers>
</ControlTemplate>

Re: ProgressBar Orientation doesn't work?

Posted: 30 Jun 2016, 09:05
by Verfin
No biggie. Just posted to let you know.

Re: ProgressBar Orientation doesn't work?

Posted: 30 Jun 2016, 21:06
by sfernandez
Have you been able to make it work with a template like this?

Re: ProgressBar Orientation doesn't work?

Posted: 12 Dec 2017, 21:21
by XaeroDegreaz
Have there been any updates on this? I'd also like to use vertical orientated ProgressBars.

Re: ProgressBar Orientation doesn't work?

Posted: 14 Dec 2017, 11:27
by sfernandez
Vertical orientation progress bar template is not included in our defualt style, but you only have to define a ProgressBar template as explained here: viewtopic.php?f=3&t=933#p5076, and then you can set it in your progress bar:
<ProgressBar Template="{StaticResource VerticalProgressBar}" Orientation="Vertical"/>
In future versions we will continue improving our defualt styles to include this.