<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls">
    
    <Style TargetType="local:RadialProgressBar" >
        <Setter Property="Foreground" Value="{ThemeResource SystemControlHighlightAccentBrush}" />
        <Setter Property="Outline" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Thickness" Value="4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RadialProgressBar">
                    <Grid Background="{TemplateBinding Background}">
                        <!-- Gray outline of progress bar -->
                        <Path Fill="Transparent" Stroke="{TemplateBinding Outline}" StrokeThickness="{TemplateBinding Thickness}" StrokeDashCap="Flat">
                            <Path.Data>
                                <PathGeometry>
                                    <PathGeometry.Figures>
                                        <PathFigureCollection>
                                            <PathFigure x:Name="OutlineFigurePart">
                                                <PathFigure.Segments>
                                                    <PathSegmentCollection>
                                                        <ArcSegment x:Name="OutlineArcPart" IsLargeArc="True" SweepDirection="Clockwise"/>
                                                    </PathSegmentCollection>
                                                </PathFigure.Segments>
                                            </PathFigure>
                                        </PathFigureCollection>
                                    </PathGeometry.Figures>
                                </PathGeometry>
                            </Path.Data>
                        </Path>
                        <!-- Progress Bar -->
                        <Path Fill="Transparent" Stroke="{TemplateBinding Foreground}" StrokeThickness="{TemplateBinding Thickness}" StrokeDashCap="Flat">
                            <Path.Data>
                                <PathGeometry>
                                    <PathGeometry.Figures>
                                        <PathFigureCollection>
                                            <PathFigure x:Name="BarFigurePart">
                                                <PathFigure.Segments>
                                                    <PathSegmentCollection>
                                                        <ArcSegment x:Name="BarArcPart" IsLargeArc="False" SweepDirection="Clockwise" />
                                                    </PathSegmentCollection>
                                                </PathFigure.Segments>
                                            </PathFigure>
                                        </PathFigureCollection>
                                    </PathGeometry.Figures>
                                </PathGeometry>
                            </Path.Data>
                        </Path>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

