Search code examples
c#xamlwin-universal-appuwp

Change size of Progress Bar


I have progress bar but dots too small, how I can make it bigger? I didnt found any property witch can change size of dots. Height/Width change onlly area where dots can move

Xaml code

<Grid // here width ="2560" height="1600"
  <ProgressBar
        Grid.Row="0"
        Grid.Column="1"
        IsIndeterminate="True"
        Visibility="{Binding MainInstance.Loading, Converter={StaticResource BooleanToVisibilityConverter}}" 
        VerticalAlignment="Stretch" 
        HorizontalAlignment="Stretch"/>
</Grid

Solution

  • There are several options to solve this, it's up to you which one you pick:

    • Change the default style of ProgressBar and increase the Ellipse Width and Height properties. You can do this in Blend or by copying the style from

    C:\Program Files (x86)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.14393.0\Generic\generic.xaml

    • Use a ViewBox control to wrap around the ProgressBar. This control resizes all content to the available size.
    • Create a templated control with your own template settings properties.

    I have created a small sample on GitHub to show you the code for all possibilities.

    enter image description here