PageRenderTime 13ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/V4/Quickstarts/BasicMVVM/BasicMVVMApp/Theme/Theme.xaml

#
XAML | 550 lines | 524 code | 16 blank | 10 comment | 0 complexity | 771cbbe61150b00caa43156735a85b24 MD5 | raw file
  1<ResourceDictionary
  2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
  5    xmlns:system="clr-namespace:System;assembly=mscorlib">
  6
  7    <!--Basic Brushes-->
  8    <Color x:Key="PrimaryColor">#FF63AADA</Color>
  9    <Color x:Key="SecondaryColor">#FFA0FCFF</Color>
 10    <SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource PrimaryColor}" />
 11    <SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource SecondaryColor}" />
 12    <SolidColorBrush x:Key="TextBrush" Color="#FF152937" />
 13    <SolidColorBrush x:Key="DisabledColor" Color="#8CFFFFFF" />
 14    <SolidColorBrush x:Key="BackgroundBrush" Color="#FFFFFFFF" />
 15    <LinearGradientBrush x:Key="MainBackground"  EndPoint="0.5,1" StartPoint="0.5,0">
 16        <GradientStop Color="#FFCEDEFF" Offset="0"/>
 17        <GradientStop Color="#FF5A7CA0" Offset="0.992"/>
 18        <GradientStop Color="#FF5882A7" Offset="0.085"/>
 19    </LinearGradientBrush>
 20    <SolidColorBrush x:Key="WaitingAnimationColor" Color="DarkBlue"/>
 21
 22    <!-- Button -->
 23    <Style TargetType="Button">
 24        <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
 25        <Setter Property="Background" Value="#00000000" />
 26        <Setter Property="Padding" Value="5,4" />
 27        <Setter Property="BorderBrush" Value="{StaticResource PrimaryBrush}" />
 28        <Setter Property="Template">
 29            <Setter.Value>
 30                <ControlTemplate TargetType="Button">
 31                    <Grid x:Name="Button_Normal">
 32                        <Grid.RowDefinitions>
 33                            <RowDefinition Height="50*" />
 34                            <RowDefinition Height="50*" />
 35                        </Grid.RowDefinitions>
 36                        <vsm:VisualStateManager.VisualStateGroups>
 37                            <vsm:VisualStateGroup x:Name="FocusStates">
 38                                <vsm:VisualState x:Name="Unfocused" />
 39                                <vsm:VisualState x:Name="Focused">
 40                                    <Storyboard>
 41                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
 42                                            <SplineColorKeyFrame KeyTime="0" Value="#BF000000" />
 43                                        </ColorAnimationUsingKeyFrames>
 44                                    </Storyboard>
 45                                </vsm:VisualState>
 46                            </vsm:VisualStateGroup>
 47                            <vsm:VisualStateGroup x:Name="CommonStates">
 48                                <vsm:VisualStateGroup.Transitions>
 49                                    <vsm:VisualTransition GeneratedDuration="00:00:00.3" />
 50                                    <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00" To="Pressed" />
 51                                    <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.1" To="Normal" />
 52                                </vsm:VisualStateGroup.Transitions>
 53                                <vsm:VisualState x:Name="MouseOver">
 54                                    <Storyboard>
 55                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
 56                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
 57                                        </DoubleAnimationUsingKeyFrames>
 58                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
 59                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
 60                                        </DoubleAnimationUsingKeyFrames>
 61                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Shadow" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
 62                                            <SplineColorKeyFrame KeyTime="0" Value="#4B000000" />
 63                                        </ColorAnimationUsingKeyFrames>
 64                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
 65                                            <SplineDoubleKeyFrame KeyTime="0" Value=".1" />
 66                                        </DoubleAnimationUsingKeyFrames>
 67                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
 68                                            <SplineColorKeyFrame KeyTime="0" Value="#4AFFFFFF" />
 69                                        </ColorAnimationUsingKeyFrames>
 70                                    </Storyboard>
 71                                </vsm:VisualState>
 72                                <vsm:VisualState x:Name="Normal" />
 73                                <vsm:VisualState x:Name="Pressed">
 74                                    <Storyboard>
 75                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
 76                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.6" />
 77                                        </DoubleAnimationUsingKeyFrames>
 78                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
 79                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
 80                                        </DoubleAnimationUsingKeyFrames>
 81                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
 82                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
 83                                        </ColorAnimationUsingKeyFrames>
 84                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
 85                                            <SplineColorKeyFrame KeyTime="0" Value="#FFC8C8C8" />
 86                                        </ColorAnimationUsingKeyFrames>
 87                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
 88                                            <SplineColorKeyFrame KeyTime="0" Value="#4BFFFFFF" />
 89                                        </ColorAnimationUsingKeyFrames>
 90                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
 91                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
 92                                        </DoubleAnimationUsingKeyFrames>
 93                                    </Storyboard>
 94                                </vsm:VisualState>
 95                                <vsm:VisualState x:Name="Disabled">
 96                                    <Storyboard>
 97                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
 98                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
 99                                        </DoubleAnimationUsingKeyFrames>
100                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
101                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2" />
102                                        </DoubleAnimationUsingKeyFrames>
103                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
104                                            <SplineColorKeyFrame KeyTime="0" Value="#FFB1B1B1" />
105                                        </ColorAnimationUsingKeyFrames>
106                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
107                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
108                                        </ColorAnimationUsingKeyFrames>
109                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
110                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
111                                        </ColorAnimationUsingKeyFrames>
112                                    </Storyboard>
113                                </vsm:VisualState>
114                            </vsm:VisualStateGroup>
115                        </vsm:VisualStateManager.VisualStateGroups>
116                        <Border CornerRadius="4" Grid.RowSpan="2" x:Name="White" BorderBrush="#FFFFFFFF" BorderThickness="1.2">
117                            <Border.Background>
118                                <RadialGradientBrush>
119                                    <RadialGradientBrush.RelativeTransform>
120                                        <TransformGroup>
121                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
122                                        </TransformGroup>
123                                    </RadialGradientBrush.RelativeTransform>
124                                    <GradientStop Color="#FFFFFFFF" Offset="0" />
125                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
126                                </RadialGradientBrush>
127                            </Border.Background>
128                        </Border>
129                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" CornerRadius="4" x:Name="Background" Grid.RowSpan="2" Opacity="0.65">
130                            <Border.Background>
131                                <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
132                                    <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
133                                    <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
134                                </LinearGradientBrush>
135                            </Border.Background>
136                        </Border>
137                        <Border Background="{TemplateBinding Background}" BorderBrush="#7FFFFFFF" BorderThickness="1" CornerRadius="3.5" x:Name="InnerBorder" Margin="1" Grid.RowSpan="2" />
138                        <Border CornerRadius="3.5" x:Name="Shadow" Margin="2" Grid.RowSpan="2">
139                            <Border.OpacityMask>
140                                <RadialGradientBrush>
141                                    <RadialGradientBrush.RelativeTransform>
142                                        <TransformGroup>
143                                            <TranslateTransform X="0" Y="-0.5" />
144                                        </TransformGroup>
145                                    </RadialGradientBrush.RelativeTransform>
146                                    <GradientStop Color="#00FFFFFF" Offset="0.3" />
147                                    <GradientStop Color="#FFFFFFFF" Offset="1" />
148                                </RadialGradientBrush>
149                            </Border.OpacityMask>
150                            <Border.Background>
151                                <RadialGradientBrush>
152                                    <RadialGradientBrush.RelativeTransform>
153                                        <TransformGroup>
154                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
155                                            <TranslateTransform Y="0.65" />
156                                        </TransformGroup>
157                                    </RadialGradientBrush.RelativeTransform>
158                                    <GradientStop Color="#00000000" Offset="0.55" />
159                                    <GradientStop Color="#33000000" Offset="1" />
160                                </RadialGradientBrush>
161                            </Border.Background>
162                        </Border>
163                        <Border Margin="1,1,1,0" CornerRadius="4,4,40,40" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
164                            <Border.Background>
165                                <RadialGradientBrush>
166                                    <RadialGradientBrush.RelativeTransform>
167                                        <TransformGroup>
168                                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
169                                            <TranslateTransform Y="-0.6" />
170                                        </TransformGroup>
171                                    </RadialGradientBrush.RelativeTransform>
172                                    <GradientStop Color="#BFFFFFFF" Offset="0" />
173                                    <GradientStop Color="#4CFFFFFF" Offset="1" />
174                                </RadialGradientBrush>
175                            </Border.Background>
176                        </Border>
177                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" RenderTransformOrigin="0.5,0.5" Grid.RowSpan="2" />
178                    </Grid>
179                </ControlTemplate>
180            </Setter.Value>
181        </Setter>
182    </Style>
183
184    <!-- TextBlocks -->
185    <Style x:Name="QuestionLabelStyle" TargetType="TextBlock" >
186        <Setter Property="FontWeight" Value="Bold" />
187    </Style>
188
189
190    <!-- TextBoxes -->
191    <Style TargetType="TextBox">
192        <Setter Property="BorderBrush" Value="#FF0F68A6" />
193        <Setter Property="BorderThickness" Value="2" />
194    </Style>
195
196    <!-- ScrollViewer-->
197    <Style TargetType="ScrollViewer">
198        <Setter Property="BorderBrush" Value="#FF0F68A6" />
199        <Setter Property="BorderThickness" Value="2" />
200        <Setter Property="Background" Value="White" />
201        <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
202    </Style>
203
204
205    <!-- Tooltip -->
206    <Style TargetType="ToolTip">
207        <Setter Property="Width" Value="250" />       
208        <Setter Property="Background" Value="#FFFF99" />
209        <Setter Property="FontSize" Value="10" />
210        <Setter Property="Foreground" Value="Black" />        
211        <Setter Property="BorderBrush" Value="#FFCC33" />
212        <Setter Property="BorderThickness" Value="2" />        
213    </Style>
214
215    <!-- Tooltip image -->
216    <Style x:Name="ToolTipImageStyle" TargetType="Image">
217        <Setter Property="Source" Value="../Images/info.png"></Setter>
218        <Setter Property="Width" Value="15"></Setter>
219        <Setter Property="Height" Value="15"></Setter>
220        <Setter Property="Margin" Value="2,0,0,0"></Setter>
221    </Style>
222
223    <!-- Border -->
224    <Style x:Name="BorderBrush" TargetType="Border">
225        <Setter Property="BorderBrush" Value="#FF0F68A6" />
226        <Setter Property="BorderThickness" Value="2" />
227    </Style>
228
229    <Style x:Name="HeaderedBorderStyle" TargetType="Border">
230        <Setter Property="BorderBrush" Value="#FF234D69" />
231        <Setter Property="BorderThickness" Value="2" />
232        <Setter Property="CornerRadius" Value="5" />
233        <Setter Property="Background" Value="#FFD3DDE2" />
234        <Setter Property="Padding" Value="5" />
235    </Style>
236
237    <!-- CheckBox -->
238    <Style TargetType="CheckBox">
239        <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
240        <Setter Property="Background" Value="#00000000" />
241        <Setter Property="HorizontalContentAlignment" Value="Left" />
242        <Setter Property="VerticalContentAlignment" Value="Center" />
243        <Setter Property="Padding" Value="4,1,0,0" />
244        <Setter Property="BorderBrush" Value="{StaticResource PrimaryBrush}" />
245        <Setter Property="Template">
246            <Setter.Value>
247                <ControlTemplate TargetType="CheckBox">
248                    <Grid>
249                        <Grid.ColumnDefinitions>
250                            <ColumnDefinition Width="16" />
251                            <ColumnDefinition Width="*" />
252                        </Grid.ColumnDefinitions>
253                        <vsm:VisualStateManager.VisualStateGroups>
254                            <vsm:VisualStateGroup x:Name="CommonStates">
255                                <vsm:VisualState x:Name="Normal" />
256                                <vsm:VisualState x:Name="MouseOver">
257                                    <Storyboard>
258                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
259                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
260                                        </DoubleAnimationUsingKeyFrames>
261                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
262                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
263                                        </DoubleAnimationUsingKeyFrames>
264                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
265                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
266                                        </DoubleAnimationUsingKeyFrames>
267                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Shadow" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
268                                            <SplineColorKeyFrame KeyTime="0" Value="#4B000000" />
269                                        </ColorAnimationUsingKeyFrames>
270                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
271                                            <SplineDoubleKeyFrame KeyTime="0" Value=".1" />
272                                        </DoubleAnimationUsingKeyFrames>
273                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
274                                            <SplineColorKeyFrame KeyTime="0" Value="#4AFFFFFF" />
275                                        </ColorAnimationUsingKeyFrames>
276                                    </Storyboard>
277                                </vsm:VisualState>
278                                <vsm:VisualState x:Name="Pressed">
279                                    <Storyboard>
280                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
281                                            <SplineDoubleKeyFrame KeyTime="0" Value="1" />
282                                        </DoubleAnimationUsingKeyFrames>
283                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
284                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.6" />
285                                        </DoubleAnimationUsingKeyFrames>
286                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
287                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
288                                        </DoubleAnimationUsingKeyFrames>
289                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
290                                            <SplineColorKeyFrame KeyTime="0" Value="#FF000000" />
291                                        </ColorAnimationUsingKeyFrames>
292                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
293                                            <SplineColorKeyFrame KeyTime="0" Value="#FFC8C8C8" />
294                                        </ColorAnimationUsingKeyFrames>
295                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
296                                            <SplineColorKeyFrame KeyTime="0" Value="#4BFFFFFF" />
297                                        </ColorAnimationUsingKeyFrames>
298                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
299                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
300                                        </DoubleAnimationUsingKeyFrames>
301                                    </Storyboard>
302                                </vsm:VisualState>
303                                <vsm:VisualState x:Name="Disabled">
304                                    <Storyboard>
305                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
306                                            <SplineDoubleKeyFrame KeyTime="0" Value=".55" />
307                                        </DoubleAnimationUsingKeyFrames>
308                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Opacity)">
309                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
310                                        </DoubleAnimationUsingKeyFrames>
311                                        <DoubleAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
312                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.2" />
313                                        </DoubleAnimationUsingKeyFrames>
314                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
315                                            <SplineColorKeyFrame KeyTime="0" Value="#FFB1B1B1" />
316                                        </ColorAnimationUsingKeyFrames>
317                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
318                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
319                                        </ColorAnimationUsingKeyFrames>
320                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
321                                            <SplineColorKeyFrame KeyTime="0" Value="#FFECECEC" />
322                                        </ColorAnimationUsingKeyFrames>
323                                    </Storyboard>
324                                </vsm:VisualState>
325                            </vsm:VisualStateGroup>
326                            <vsm:VisualStateGroup x:Name="CheckStates">
327                                <vsm:VisualState x:Name="Checked">
328                                    <Storyboard>
329                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="Bullet" Storyboard.TargetProperty="(UIElement.Visibility)">
330                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
331                                        </ObjectAnimationUsingKeyFrames>
332                                    </Storyboard>
333                                </vsm:VisualState>
334                                <vsm:VisualState x:Name="Unchecked" />
335                                <vsm:VisualState x:Name="Indeterminate">
336                                    <Storyboard>
337                                        <ObjectAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="IndeterminateRectangle" Storyboard.TargetProperty="(UIElement.Visibility)">
338                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
339                                        </ObjectAnimationUsingKeyFrames>
340                                    </Storyboard>
341                                </vsm:VisualState>
342                            </vsm:VisualStateGroup>
343                            <vsm:VisualStateGroup x:Name="FocusStates">
344                                <vsm:VisualState x:Name="Focused">
345                                    <Storyboard>
346                                        <ColorAnimationUsingKeyFrames Duration="00:00:00.001" Storyboard.TargetName="InnerBorder" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
347                                            <SplineColorKeyFrame KeyTime="0" Value="#BF000000" />
348                                        </ColorAnimationUsingKeyFrames>
349                                    </Storyboard>
350                                </vsm:VisualState>
351                                <vsm:VisualState x:Name="Unfocused" />
352                            </vsm:VisualStateGroup>
353                            <vsm:VisualStateGroup x:Name="ValidationStates">
354                                <vsm:VisualState x:Name="Valid"/>
355                                <vsm:VisualState x:Name="InvalidUnfocused">
356                                    <Storyboard>
357                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
358                                            <DiscreteObjectKeyFrame KeyTime="0">
359                                                <DiscreteObjectKeyFrame.Value>
360                                                    <Visibility>Visible</Visibility>
361                                                </DiscreteObjectKeyFrame.Value>
362                                            </DiscreteObjectKeyFrame>
363                                        </ObjectAnimationUsingKeyFrames>
364                                    </Storyboard>
365                                </vsm:VisualState>
366                                <vsm:VisualState x:Name="InvalidFocused">
367                                    <Storyboard>
368                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
369                                            <DiscreteObjectKeyFrame KeyTime="0">
370                                                <DiscreteObjectKeyFrame.Value>
371                                                    <Visibility>Visible</Visibility>
372                                                </DiscreteObjectKeyFrame.Value>
373                                            </DiscreteObjectKeyFrame>
374                                        </ObjectAnimationUsingKeyFrames>
375                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsOpen">
376                                            <DiscreteObjectKeyFrame KeyTime="0">
377                                                <DiscreteObjectKeyFrame.Value>
378                                                    <system:Boolean>True</system:Boolean>
379                                                </DiscreteObjectKeyFrame.Value>
380                                            </DiscreteObjectKeyFrame>
381                                        </ObjectAnimationUsingKeyFrames>
382                                    </Storyboard>
383                                </vsm:VisualState>
384                            </vsm:VisualStateGroup>
385
386                        </vsm:VisualStateManager.VisualStateGroups>
387                        <Grid VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Width="16" Height="16">
388                            <Grid.RowDefinitions>
389                                <RowDefinition Height="50*" />
390                                <RowDefinition Height="50*" />
391                            </Grid.RowDefinitions>
392                            <Border Grid.RowSpan="2" x:Name="White" BorderBrush="#FFB5B5B5" BorderThickness="1.2">
393                                <Border.Background>
394                                    <RadialGradientBrush>
395                                        <RadialGradientBrush.RelativeTransform>
396                                            <TransformGroup>
397                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.35" ScaleY="1.35" />
398                                            </TransformGroup>
399                                        </RadialGradientBrush.RelativeTransform>
400                                        <GradientStop Color="#FFFFFFFF" Offset="0" />
401                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
402                                    </RadialGradientBrush>
403                                </Border.Background>
404                            </Border>
405                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1.2" x:Name="Background" Grid.RowSpan="2" Opacity=".5">
406                                <Border.Background>
407                                    <LinearGradientBrush EndPoint="0.5,1.4" StartPoint="0.5,0">
408                                        <GradientStop Color="{StaticResource PrimaryColor}" Offset="0.75" />
409                                        <GradientStop Color="{StaticResource SecondaryColor}" Offset="1" />
410                                    </LinearGradientBrush>
411                                </Border.Background>
412                            </Border>
413                            <Border Background="{TemplateBinding Background}" BorderBrush="#FFFFFFFF" BorderThickness=".75" x:Name="InnerBorder" Margin="1" Grid.RowSpan="2" Visibility="Visible" />
414                            <Border x:Name="Shadow" Margin="3" Grid.RowSpan="2">
415                                <Border.OpacityMask>
416                                    <RadialGradientBrush>
417                                        <RadialGradientBrush.RelativeTransform>
418                                            <TransformGroup>
419                                                <TranslateTransform X="0" Y="-0.5" />
420                                            </TransformGroup>
421                                        </RadialGradientBrush.RelativeTransform>
422                                        <GradientStop Color="#00FFFFFF" Offset="0.3" />
423                                        <GradientStop Color="#FFFFFFFF" Offset="1" />
424                                    </RadialGradientBrush>
425                                </Border.OpacityMask>
426                                <Border.Background>
427                                    <RadialGradientBrush>
428                                        <RadialGradientBrush.RelativeTransform>
429                                            <TransformGroup>
430                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.75" ScaleY="2.25" />
431                                                <TranslateTransform Y="0.65" />
432                                            </TransformGroup>
433                                        </RadialGradientBrush.RelativeTransform>
434                                        <GradientStop Color="#00000000" Offset="0.55" />
435                                        <GradientStop Color="#33000000" Offset="1" />
436                                    </RadialGradientBrush>
437                                </Border.Background>
438                            </Border>
439                            <Border Margin="1,1,1,0" CornerRadius="0,0,7,7" x:Name="Highlight" Opacity="0.8" RenderTransformOrigin="0.5,1">
440                                <Border.Background>
441                                    <RadialGradientBrush>
442                                        <RadialGradientBrush.RelativeTransform>
443                                            <TransformGroup>
444                                                <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.25" ScaleY="2" />
445                                                <TranslateTransform Y="-0.6" />
446                                            </TransformGroup>
447                                        </RadialGradientBrush.RelativeTransform>
448                                        <GradientStop Color="#BFFFFFFF" Offset="0" />
449                                        <GradientStop Color="#4CFFFFFF" Offset="1" />
450                                    </RadialGradientBrush>
451                                </Border.Background>
452                            </Border>
453                            <Rectangle Stroke="{x:Null}" StrokeThickness="0" x:Name="IndeterminateRectangle" Fill="{StaticResource TextBrush}" Visibility="Collapsed" Height="3" Margin="4,4,4,4" Grid.RowSpan="2" RadiusX="1" RadiusY="1" />
454                            <Grid Opacity="0.8" Visibility="Collapsed" x:Name="Bullet" Margin="-0.25,-0.25,0,0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.RowSpan="2">
455                                <Path Fill="{TemplateBinding Foreground}" Data="M1.6045539,4.9657478 L3.9166667,6.7270508 L8.7999792,0.13644244 L10.335848,1.2280303 L4.1581869,9.0391064 L0.39386681,6.6038928 z" Margin="1,-1,-1,0" Stretch="Fill" StrokeLineJoin="Miter" StrokeMiterLimit="10" VerticalAlignment="Stretch" />
456                            </Grid>
457                            <Border x:Name="ValidationErrorElement" Visibility="Collapsed" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="7">
458                                <ToolTipService.ToolTip>
459                                    <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
460                                        <ToolTip.Triggers>
461                                            <EventTrigger RoutedEvent="Canvas.Loaded">
462                                                <BeginStoryboard>
463                                                    <Storyboard>
464                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
465                                                            <DiscreteObjectKeyFrame KeyTime="0">
466                                                                <DiscreteObjectKeyFrame.Value>
467                                                                    <system:Boolean>true</system:Boolean>
468                                                                </DiscreteObjectKeyFrame.Value>
469                                                            </DiscreteObjectKeyFrame>
470                                                        </ObjectAnimationUsingKeyFrames>
471                                                    </Storyboard>
472                                                </BeginStoryboard>
473                                            </EventTrigger>
474                                        </ToolTip.Triggers>
475                                    </ToolTip>
476                                </ToolTipService.ToolTip>
477                                <Grid Height="12" HorizontalAlignment="Right" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12" Background="Transparent">
478                                    <Path Fill="#FFDC000C" Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"/>
479                                    <Path Fill="#ffffff" Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8"/>
480                                </Grid>
481                            </Border>
482
483                        </Grid>
484                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
485                    </Grid>
486                </ControlTemplate>
487            </Setter.Value>
488        </Setter>
489    </Style>
490
491    <!--ValidationTooltipTemplate-->
492    <ControlTemplate x:Key="ValidationToolTipTemplate">
493        <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
494            <vsm:VisualStateManager.VisualStateGroups>
495                <vsm:VisualStateGroup x:Name="OpenStates">
496                    <vsm:VisualStateGroup.Transitions>
497                        <vsm:VisualTransition GeneratedDuration="0"/>
498                        <vsm:VisualTransition GeneratedDuration="0:0:0.2" To="Open">
499                            <Storyboard>
500                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
501                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
502                                </DoubleAnimationUsingKeyFrames>
503                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
504                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
505                                </DoubleAnimationUsingKeyFrames>
506                            </Storyboard>
507                        </vsm:VisualTransition>
508                    </vsm:VisualStateGroup.Transitions>
509                    <vsm:VisualState x:Name="Closed">
510                        <Storyboard>
511                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
512                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
513                            </DoubleAnimationUsingKeyFrames>
514                        </Storyboard>
515                    </vsm:VisualState>
516                    <vsm:VisualState x:Name="Open">
517                        <Storyboard>
518                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
519                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
520                            </DoubleAnimationUsingKeyFrames>
521                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
522                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
523                            </DoubleAnimationUsingKeyFrames>
524                        </Storyboard>
525                    </vsm:VisualState>
526                </vsm:VisualStateGroup>
527            </vsm:VisualStateManager.VisualStateGroups>
528            <Grid.RenderTransform>
529                <TranslateTransform x:Name="xform" X="-25"/>
530            </Grid.RenderTransform>
531            <Border Margin="4,4,-4,-4" Background="#152A2E31" CornerRadius="4"/>
532            <Border Margin="3,3,-3,-3" Background="#252A2E31" CornerRadius="4"/>
533            <Border Margin="2,2,-2,-2" Background="#352A2E31" CornerRadius="4"/>
534            <Border Margin="1,1,-1,-1" Background="#452A2E31" CornerRadius="4"/>
535            <Border Background="#FFDC000C" CornerRadius="4"/>
536            <Border CornerRadius="4">
537                <Border.Background>
538                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
539                        <GradientStop Color="#66FFFFFF"/>
540                        <GradientStop Color="#66000000" Offset="1"/>
541                        <GradientStop Color="#00E5E5E5" Offset="0.1"/>
542                        <GradientStop Color="#00161616" Offset="0.9"/>
543                    </LinearGradientBrush>
544                </Border.Background>
545                <TextBlock Margin="8,3,8,4" MaxWidth="250" UseLayoutRounding="false" Foreground="White" Text="{Binding Path=(Validation.Errors)[0].ErrorContent}" TextWrapping="Wrap"/>
546            </Border>
547        </Grid>
548    </ControlTemplate>
549
550</ResourceDictionary>