How to increase the thickness of the determinant indicator bar?
I added a progress bar to a Windows 8.1 app, but I don't see a way to increase the thickness of the progress bar.
I tried to change the thickness by increasing the height property, but that doesn't affect its size.
Does anyone know how to increase the height / thickness of the red progress bar?
This is the progress bar declaration in my xaml:
<ProgressBar IsIndeterminate="False" Maximum="100" Value="30" Width="200" Margin="128,240,128,262"/>
source to share
You should be able to change the thickness of the ProgressBar simply by setting its Height property. Similar:
<ProgressBar Height="50" IsIndeterminate="False" Maximum="100" Value="30" Width="200" Margin="128,240,128,262"/>
You can find a working sample here on GitHub .
If you need to change more things, you can override the ProgressBar style:
Open the designer window, right click on the progress bar and Edit Templatethen make a copy. Then you should see the style of your progress bar in resources. In this style you will find a ControlTemplate and inside there is a Rectangle named ProgressBarIndicator
(at the end):
... something above
<Border x:Name="DeterminateRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" MinHeight="{TemplateBinding MinHeight}">
<Rectangle x:Name="ProgressBarIndicator" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}"/>
</Border>
</Grid>
</ControlTemplate>
For example, you can set the Height property of this rectangle and you should achieve your goal.
source to share