Wpf Rounded corners progress bar

Put a border inside and set the corner radius property of the border instead. Here is the link describing this progressbar bar style right radius


From Visual Studio Designer Right Click on the ProgressBar > Edit Template > Edit a Copy, In the Generated Style add CornerRadius to the Border and set the RadiusX and RadiusY in the filling Rectangles :

<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="30"/>
                        <Rectangle x:Name="PART_Track" />
                        <Grid x:Name="PART_Indicator" ClipToBounds="true" HorizontalAlignment="Left">
                            <Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}" RadiusX="30" RadiusY="30"/>
                            <Rectangle x:Name="Animation" Fill="{TemplateBinding Foreground}" RenderTransformOrigin="0.5,0.5" RadiusX="30" RadiusY="30">
                                <Rectangle.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Rectangle.RenderTransform>
                            </Rectangle>
                        </Grid>

Tags:

C#

Wpf

Templates