summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT.Phone/FormsProgressBarStyle.xaml
blob: fec83e638859a003d6619dedb37c18c909e7b07c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:winRt="using:Xamarin.Forms.Platform.WinRT">

    <!-- Default style for Windows.UI.Xaml.Controls.ProgressBar -->
    <Style x:Key="FormsProgressBarStyle" TargetType="winRt:FormsProgressBar">
        <Setter Property="Foreground" Value="{ThemeResource ProgressBarForegroundThemeBrush}" />
        <Setter Property="Background" Value="{ThemeResource ProgressBarBackgroundThemeBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ProgressBarBorderThemeBrush}" />
        <Setter Property="BorderThickness" Value="{ThemeResource ProgressBarBorderThemeThickness}" />
        <Setter Property="Maximum" Value="100" />
        <Setter Property="MinHeight" Value="{ThemeResource ProgressBarThemeMinHeight}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ProgressBar">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Updating" To="Determinate">
                                        <Storyboard>
                                            <RepositionThemeAnimation TargetName="ProgressBarIndicator" FromHorizontalOffset="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.IndicatorLengthDelta}" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="Paused" To="Determinate">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="ProgressBarIndicator"
                                                             Storyboard.TargetProperty="Opacity"
                                                             To="1"
                                                             Duration="0:0:0.25" />
                                        </Storyboard>
                                    </VisualTransition>
                                    <VisualTransition From="Indeterminate">
                                        <Storyboard>
                                            <FadeInThemeAnimation TargetName="EllipseGrid" />
                                        </Storyboard>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Determinate" />
                                <VisualState x:Name="Updating" />
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard RepeatBehavior="Forever">
                                        <DoubleAnimation Storyboard.TargetName="EllipseGrid"
                                                         Duration="0:0:3.917"
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"
                                                         From="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ContainerAnimationStartPosition}"
                                                         To="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.ContainerAnimationEndPosition}" />
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="E1">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:1" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" KeySpline="0.4,0,0.6,1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:3" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationEndPosition}" KeySpline="0.4,0,0.6,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="E2">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.167" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:1.167" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" KeySpline="0.4,0,0.6,1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2.167" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:3.167" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationEndPosition}" KeySpline="0.4,0,0.6,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="E3">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.333" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:1.333" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" KeySpline="0.4,0,0.6,1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2.333" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:3.333" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationEndPosition}" KeySpline="0.4,0,0.6,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="E4">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:1.5" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" KeySpline="0.4,0,0.6,1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2.5" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:3.5" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationEndPosition}" KeySpline="0.4,0,0.6,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="E5">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.667" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:1.667" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" KeySpline="0.4,0,0.6,1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2.667" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationWellPosition}" />
                                            <SplineDoubleKeyFrame KeyTime="0:0:3.667" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseAnimationEndPosition}" KeySpline="0.4,0,0.6,1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="B1">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="-50" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3" Value="100" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="B2">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="-50" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.667" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2.167" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.167" Value="100" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="B3">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="-50" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.833" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2.333" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.333" Value="100" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="B4">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="-50" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2.5" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="100" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="B5">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="-50" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:1.167" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:2.667" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.667" Value="100" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <!-- The ElementOpacity on FormsProgressBar is used in place of Opacity so that the user may specify
                                             a particular value they might wish to use, and also prevents unintended interactions between
                                             Element.Opacity and Control.Opacity. -->
                                        <DoubleAnimation Storyboard.TargetName="EllipseGrid"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="{Binding ElementOpacity, RelativeSource={RelativeSource TemplatedParent}}"
                                                         Duration="0" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="E1"
                                                                      Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ProgressBarIndeterminateForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="E2"
                                                                      Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ProgressBarIndeterminateForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="E3"
                                                                      Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ProgressBarIndeterminateForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="E4"
                                                                      Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ProgressBarIndeterminateForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="E5"
                                                                      Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ProgressBarIndeterminateForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <!-- Both FadeOutThemeAnimation and a DoubleAnimation on Opacity are necessary
                                             here.  The FadeOutThemeAnimation is necessary in the Indeterminate state so
                                             that we can do a FadeInThemeAnimation when transitioning back to the
                                             Determinate state.  The DoubleAnimation on Opacity is necessary to hide the
                                             DeterminateRoot immediately so that it does not slowly fade out during each
                                             iteration of the Indeterminate state animation. -->
                                        <FadeOutThemeAnimation TargetName="DeterminateRoot" />
                                        <DoubleAnimation Storyboard.TargetName="DeterminateRoot"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="0"
                                                         Duration="0" />
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="E1">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="E2">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.167" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.167" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.167" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.167" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="E3">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.333" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.333" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.333" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.333" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="E4">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="E5">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.667" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.667" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.667" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="0:0:3.667" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Error">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ProgressBarIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Paused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="ProgressBarIndicator"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="0.5"
                                                         Duration="0:0:0.25" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="EllipseGrid"
                              Opacity="0">
                            <Grid.RenderTransform>
                                <TranslateTransform />
                            </Grid.RenderTransform>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Border x:Name="B1"
                                    Grid.Column="8"
                                    RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <TranslateTransform />
                                </Border.RenderTransform>
                                <Ellipse x:Name="E1"
                                         Fill="{TemplateBinding Foreground}"
                                         Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         RenderTransformOrigin="0.5,0.5">
                                    <Ellipse.RenderTransform>
                                        <TranslateTransform />
                                    </Ellipse.RenderTransform>
                                </Ellipse>
                            </Border>
                            <Rectangle Grid.Column="7"
                                       Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseOffset}" />
                            <Border x:Name="B2"
                                    Grid.Column="6"
                                    RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <TranslateTransform />
                                </Border.RenderTransform>
                                <Ellipse x:Name="E2"
                                         Fill="{TemplateBinding Foreground}"
                                         Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         RenderTransformOrigin="0.5,0.5">
                                    <Ellipse.RenderTransform>
                                        <TranslateTransform />
                                    </Ellipse.RenderTransform>
                                </Ellipse>
                            </Border>
                            <Rectangle Grid.Column="5"
                                       Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseOffset}" />
                            <Border x:Name="B3"
                                    Grid.Column="4"
                                    RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <TranslateTransform />
                                </Border.RenderTransform>
                                <Ellipse x:Name="E3"
                                         Fill="{TemplateBinding Foreground}"
                                         Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         RenderTransformOrigin="0.5,0.5">
                                    <Ellipse.RenderTransform>
                                        <TranslateTransform />
                                    </Ellipse.RenderTransform>
                                </Ellipse>
                            </Border>
                            <Rectangle Grid.Column="3"
                                       Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseOffset}" />
                            <Border x:Name="B4"
                                    Grid.Column="2"
                                    RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <TranslateTransform />
                                </Border.RenderTransform>
                                <Ellipse x:Name="E4"
                                         Fill="{TemplateBinding Foreground}"
                                         Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         RenderTransformOrigin="0.5,0.5">
                                    <Ellipse.RenderTransform>
                                        <TranslateTransform />
                                    </Ellipse.RenderTransform>
                                </Ellipse>
                            </Border>
                            <Rectangle Grid.Column="1"
                                       Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseOffset}" />
                            <Border x:Name="B5"
                                    Grid.Column="0"
                                    RenderTransformOrigin="0.5,0.5">
                                <Border.RenderTransform>
                                    <TranslateTransform />
                                </Border.RenderTransform>
                                <Ellipse x:Name="E5"
                                         Fill="{TemplateBinding Foreground}"
                                         Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.EllipseDiameter}"
                                         RenderTransformOrigin="0.5,0.5">
                                    <Ellipse.RenderTransform>
                                        <TranslateTransform />
                                    </Ellipse.RenderTransform>
                                </Ellipse>
                            </Border>
                        </Grid>
                        <Border x:Name="DeterminateRoot"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Rectangle x:Name="ProgressBarIndicator"
                                       Margin="{TemplateBinding Padding}"
                                       Fill="{TemplateBinding Foreground}"
                                       HorizontalAlignment="Left" />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>