2 //*********************************************************
4 // Copyright (c) Microsoft. All rights reserved.
5 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
10 //*********************************************************
14 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
15 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
17 <!-- Non-brush values that vary across themes -->
19 <ResourceDictionary.ThemeDictionaries>
20 <ResourceDictionary x:Key="Default">
21 <x:String x:Key="BackButtonGlyph"></x:String>
22 <x:String x:Key="BackButtonSnappedGlyph"></x:String>
25 <ResourceDictionary x:Key="HighContrast">
26 <x:String x:Key="BackButtonGlyph"></x:String>
27 <x:String x:Key="BackButtonSnappedGlyph"></x:String>
29 </ResourceDictionary.ThemeDictionaries>
31 <!-- RichTextBlock styles -->
33 <Style x:Key="BasicRichTextStyle" TargetType="RichTextBlock">
34 <Setter Property="Foreground" Value="{StaticResource ApplicationForegroundThemeBrush}"/>
35 <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
36 <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
37 <Setter Property="TextTrimming" Value="WordEllipsis"/>
38 <Setter Property="TextWrapping" Value="Wrap"/>
39 <Setter Property="Typography.StylisticSet20" Value="True"/>
40 <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
43 <Style x:Key="BaselineRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BasicRichTextStyle}">
44 <Setter Property="LineHeight" Value="20"/>
45 <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
46 <!-- Properly align text along its baseline -->
47 <Setter Property="RenderTransform">
49 <TranslateTransform X="-1" Y="4"/>
54 <Style x:Key="ItemRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BaselineRichTextStyle}"/>
56 <Style x:Key="BodyRichTextStyle" TargetType="RichTextBlock" BasedOn="{StaticResource BaselineRichTextStyle}">
57 <Setter Property="FontWeight" Value="SemiLight"/>
60 <!-- TextBlock styles -->
62 <Style x:Key="BasicTextStyle" TargetType="TextBlock">
63 <Setter Property="Foreground" Value="{StaticResource ApplicationForegroundThemeBrush}"/>
64 <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
65 <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
66 <Setter Property="TextTrimming" Value="WordEllipsis"/>
67 <Setter Property="TextWrapping" Value="Wrap"/>
68 <Setter Property="Typography.StylisticSet20" Value="True"/>
69 <Setter Property="Typography.DiscretionaryLigatures" Value="True"/>
72 <Style x:Key="BaselineTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BasicTextStyle}">
73 <Setter Property="LineHeight" Value="20"/>
74 <Setter Property="LineStackingStrategy" Value="BlockLineHeight"/>
75 <!-- Properly align text along its baseline -->
76 <Setter Property="RenderTransform">
78 <TranslateTransform X="-1" Y="4"/>
83 <Style x:Key="HeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
84 <Setter Property="FontSize" Value="56"/>
85 <Setter Property="FontWeight" Value="Light"/>
86 <Setter Property="LineHeight" Value="40"/>
87 <Setter Property="RenderTransform">
89 <TranslateTransform X="-2" Y="8"/>
94 <Style x:Key="SubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
95 <Setter Property="FontSize" Value="26.667"/>
96 <Setter Property="FontWeight" Value="Light"/>
97 <Setter Property="LineHeight" Value="30"/>
98 <Setter Property="RenderTransform">
100 <TranslateTransform X="-1" Y="6"/>
105 <Style x:Key="TitleTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
106 <Setter Property="FontWeight" Value="SemiBold"/>
109 <Style x:Key="ItemTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}"/>
111 <Style x:Key="BodyTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
112 <Setter Property="FontWeight" Value="SemiLight"/>
115 <Style x:Key="CaptionTextStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
116 <Setter Property="FontSize" Value="12"/>
117 <Setter Property="Foreground" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>
120 <!-- Button styles -->
123 TextButtonStyle is used to style a Button using subheader-styled text with no other adornment. This
124 style is used in the GroupedItemsPage as a group header and in the FileOpenPickerPage for triggering
127 <Style x:Key="TextButtonStyle" TargetType="Button">
128 <Setter Property="MinWidth" Value="0"/>
129 <Setter Property="MinHeight" Value="0"/>
130 <Setter Property="Template">
132 <ControlTemplate TargetType="Button">
133 <Grid Background="Transparent">
136 Text="{TemplateBinding Content}"
138 TextWrapping="NoWrap"
139 Style="{StaticResource SubheaderTextStyle}"/>
141 x:Name="FocusVisualWhite"
142 IsHitTestVisible="False"
143 Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
144 StrokeEndLineCap="Square"
145 StrokeDashArray="1,1"
147 StrokeDashOffset="1.5"/>
149 x:Name="FocusVisualBlack"
150 IsHitTestVisible="False"
151 Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
152 StrokeEndLineCap="Square"
153 StrokeDashArray="1,1"
155 StrokeDashOffset="0.5"/>
157 <VisualStateManager.VisualStateGroups>
158 <VisualStateGroup x:Name="CommonStates">
159 <VisualState x:Name="Normal"/>
160 <VisualState x:Name="PointerOver">
162 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
163 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPointerOverForegroundThemeBrush}"/>
164 </ObjectAnimationUsingKeyFrames>
167 <VisualState x:Name="Pressed">
169 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
170 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>
171 </ObjectAnimationUsingKeyFrames>
174 <VisualState x:Name="Disabled">
176 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
177 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
178 </ObjectAnimationUsingKeyFrames>
182 <VisualStateGroup x:Name="FocusStates">
183 <VisualState x:Name="Focused">
185 <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity"/>
186 <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity"/>
189 <VisualState x:Name="Unfocused"/>
191 </VisualStateManager.VisualStateGroups>
199 TextRadioButtonStyle is used to style a RadioButton using subheader-styled text with no other adornment.
200 This style is used in the SearchResultsPage to allow selection among filters.
202 <Style x:Key="TextRadioButtonStyle" TargetType="RadioButton">
203 <Setter Property="MinWidth" Value="0"/>
204 <Setter Property="MinHeight" Value="0"/>
205 <Setter Property="Template">
207 <ControlTemplate TargetType="RadioButton">
208 <Grid Background="Transparent">
211 Text="{TemplateBinding Content}"
213 TextWrapping="NoWrap"
214 Style="{StaticResource SubheaderTextStyle}"/>
216 x:Name="FocusVisualWhite"
217 IsHitTestVisible="False"
218 Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
219 StrokeEndLineCap="Square"
220 StrokeDashArray="1,1"
222 StrokeDashOffset="1.5"/>
224 x:Name="FocusVisualBlack"
225 IsHitTestVisible="False"
226 Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
227 StrokeEndLineCap="Square"
228 StrokeDashArray="1,1"
230 StrokeDashOffset="0.5"/>
232 <VisualStateManager.VisualStateGroups>
233 <VisualStateGroup x:Name="CommonStates">
234 <VisualState x:Name="Normal"/>
235 <VisualState x:Name="PointerOver">
237 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
238 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPointerOverForegroundThemeBrush}"/>
239 </ObjectAnimationUsingKeyFrames>
242 <VisualState x:Name="Pressed">
244 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
245 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPressedForegroundThemeBrush}"/>
246 </ObjectAnimationUsingKeyFrames>
249 <VisualState x:Name="Disabled">
251 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
252 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
253 </ObjectAnimationUsingKeyFrames>
257 <VisualStateGroup x:Name="FocusStates">
258 <VisualState x:Name="Focused">
260 <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity"/>
261 <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity"/>
264 <VisualState x:Name="Unfocused"/>
266 <VisualStateGroup x:Name="CheckStates">
267 <VisualState x:Name="Checked"/>
268 <VisualState x:Name="Unchecked">
270 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
271 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationSecondaryForegroundThemeBrush}"/>
272 </ObjectAnimationUsingKeyFrames>
275 <VisualState x:Name="Indeterminate"/>
277 </VisualStateManager.VisualStateGroups>
285 AppBarButtonStyle is used to style a Button for use in an App Bar. Content will be centered and should fit within
286 the 40-pixel radius glyph provided. 16-point Segoe UI Symbol is used for content text to simplify the use of glyphs
287 from that font. AutomationProperties.Name is used for the text below the glyph.
289 <Style x:Key="AppBarButtonStyle" TargetType="Button">
290 <Setter Property="Foreground" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
291 <Setter Property="VerticalAlignment" Value="Stretch"/>
292 <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
293 <Setter Property="FontWeight" Value="Normal"/>
294 <Setter Property="FontSize" Value="20"/>
295 <Setter Property="AutomationProperties.ItemType" Value="App Bar Button"/>
296 <Setter Property="Template">
298 <ControlTemplate TargetType="Button">
299 <Grid Width="100" Background="Transparent">
300 <StackPanel VerticalAlignment="Top" Margin="0,14,0,13">
301 <Grid Width="40" Height="40" Margin="0,0,0,5" HorizontalAlignment="Center">
302 <TextBlock x:Name="BackgroundGlyph" Text="" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0" Foreground="{StaticResource AppBarItemBackgroundThemeBrush}"/>
303 <TextBlock x:Name="OutlineGlyph" Text="" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0"/>
304 <ContentPresenter x:Name="Content" HorizontalAlignment="Center" Margin="-1,-1,0,0" VerticalAlignment="Center"/>
308 Text="{TemplateBinding AutomationProperties.Name}"
311 TextAlignment="Center"
314 TextTrimming="WordEllipsis"
315 Style="{StaticResource BasicTextStyle}"/>
318 x:Name="FocusVisualWhite"
319 IsHitTestVisible="False"
320 Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
321 StrokeEndLineCap="Square"
322 StrokeDashArray="1,1"
324 StrokeDashOffset="1.5"/>
326 x:Name="FocusVisualBlack"
327 IsHitTestVisible="False"
328 Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
329 StrokeEndLineCap="Square"
330 StrokeDashArray="1,1"
332 StrokeDashOffset="0.5"/>
334 <VisualStateManager.VisualStateGroups>
335 <VisualStateGroup x:Name="CommonStates">
336 <VisualState x:Name="Normal"/>
337 <VisualState x:Name="PointerOver">
339 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
340 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverBackgroundThemeBrush}"/>
341 </ObjectAnimationUsingKeyFrames>
342 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
343 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverForegroundThemeBrush}"/>
344 </ObjectAnimationUsingKeyFrames>
347 <VisualState x:Name="Pressed">
350 Storyboard.TargetName="OutlineGlyph"
351 Storyboard.TargetProperty="Opacity"
354 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
355 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
356 </ObjectAnimationUsingKeyFrames>
357 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
358 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>
359 </ObjectAnimationUsingKeyFrames>
362 <VisualState x:Name="Disabled">
364 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
365 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
366 </ObjectAnimationUsingKeyFrames>
367 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
368 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
369 </ObjectAnimationUsingKeyFrames>
370 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Foreground">
371 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
372 </ObjectAnimationUsingKeyFrames>
376 <VisualStateGroup x:Name="FocusStates">
377 <VisualState x:Name="Focused">
380 Storyboard.TargetName="FocusVisualWhite"
381 Storyboard.TargetProperty="Opacity"
385 Storyboard.TargetName="FocusVisualBlack"
386 Storyboard.TargetProperty="Opacity"
391 <VisualState x:Name="Unfocused" />
392 <VisualState x:Name="PointerFocused" />
394 </VisualStateManager.VisualStateGroups>
401 <!-- Standard App Bar buttons -->
403 <Style x:Key="SkipBackAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
404 <Setter Property="AutomationProperties.AutomationId" Value="SkipBackAppBarButton"/>
405 <Setter Property="AutomationProperties.Name" Value="Skip Back"/>
406 <Setter Property="Content" Value=""/>
408 <Style x:Key="SkipAheadAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
409 <Setter Property="AutomationProperties.AutomationId" Value="SkipAheadAppBarButton"/>
410 <Setter Property="AutomationProperties.Name" Value="Skip Ahead"/>
411 <Setter Property="Content" Value=""/>
413 <Style x:Key="PlayAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
414 <Setter Property="AutomationProperties.AutomationId" Value="PlayAppBarButton"/>
415 <Setter Property="AutomationProperties.Name" Value="Play"/>
416 <Setter Property="Content" Value=""/>
418 <Style x:Key="PauseAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
419 <Setter Property="AutomationProperties.AutomationId" Value="PauseAppBarButton"/>
420 <Setter Property="AutomationProperties.Name" Value="Pause"/>
421 <Setter Property="Content" Value=""/>
423 <Style x:Key="EditAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
424 <Setter Property="AutomationProperties.AutomationId" Value="EditAppBarButton"/>
425 <Setter Property="AutomationProperties.Name" Value="Edit"/>
426 <Setter Property="Content" Value=""/>
428 <Style x:Key="SaveAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
429 <Setter Property="AutomationProperties.AutomationId" Value="SaveAppBarButton"/>
430 <Setter Property="AutomationProperties.Name" Value="Save"/>
431 <Setter Property="Content" Value=""/>
433 <Style x:Key="DeleteAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
434 <Setter Property="AutomationProperties.AutomationId" Value="DeleteAppBarButton"/>
435 <Setter Property="AutomationProperties.Name" Value="Delete"/>
436 <Setter Property="Content" Value=""/>
438 <Style x:Key="DiscardAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
439 <Setter Property="AutomationProperties.AutomationId" Value="DiscardAppBarButton"/>
440 <Setter Property="AutomationProperties.Name" Value="Discard"/>
441 <Setter Property="Content" Value=""/>
443 <Style x:Key="RemoveAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
444 <Setter Property="AutomationProperties.AutomationId" Value="RemoveAppBarButton"/>
445 <Setter Property="AutomationProperties.Name" Value="Remove"/>
446 <Setter Property="Content" Value=""/>
448 <Style x:Key="AddAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
449 <Setter Property="AutomationProperties.AutomationId" Value="AddAppBarButton"/>
450 <Setter Property="AutomationProperties.Name" Value="Add"/>
451 <Setter Property="Content" Value=""/>
453 <Style x:Key="NoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
454 <Setter Property="AutomationProperties.AutomationId" Value="NoAppBarButton"/>
455 <Setter Property="AutomationProperties.Name" Value="No"/>
456 <Setter Property="Content" Value=""/>
458 <Style x:Key="YesAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
459 <Setter Property="AutomationProperties.AutomationId" Value="YesAppBarButton"/>
460 <Setter Property="AutomationProperties.Name" Value="Yes"/>
461 <Setter Property="Content" Value=""/>
463 <Style x:Key="MoreAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
464 <Setter Property="AutomationProperties.AutomationId" Value="MoreAppBarButton"/>
465 <Setter Property="AutomationProperties.Name" Value="More"/>
466 <Setter Property="Content" Value=""/>
468 <Style x:Key="RedoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
469 <Setter Property="AutomationProperties.AutomationId" Value="RedoAppBarButton"/>
470 <Setter Property="AutomationProperties.Name" Value="Redo"/>
471 <Setter Property="Content" Value=""/>
473 <Style x:Key="UndoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
474 <Setter Property="AutomationProperties.AutomationId" Value="UndoAppBarButton"/>
475 <Setter Property="AutomationProperties.Name" Value="Undo"/>
476 <Setter Property="Content" Value=""/>
478 <Style x:Key="HomeAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
479 <Setter Property="AutomationProperties.AutomationId" Value="HomeAppBarButton"/>
480 <Setter Property="AutomationProperties.Name" Value="Home"/>
481 <Setter Property="Content" Value=""/>
483 <Style x:Key="OutAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
484 <Setter Property="AutomationProperties.AutomationId" Value="OutAppBarButton"/>
485 <Setter Property="AutomationProperties.Name" Value="Out"/>
486 <Setter Property="Content" Value=""/>
488 <Style x:Key="NextAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
489 <Setter Property="AutomationProperties.AutomationId" Value="NextAppBarButton"/>
490 <Setter Property="AutomationProperties.Name" Value="Next"/>
491 <Setter Property="Content" Value=""/>
493 <Style x:Key="PreviousAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
494 <Setter Property="AutomationProperties.AutomationId" Value="PreviousAppBarButton"/>
495 <Setter Property="AutomationProperties.Name" Value="Previous"/>
496 <Setter Property="Content" Value=""/>
498 <Style x:Key="FavoriteAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
499 <Setter Property="AutomationProperties.AutomationId" Value="FavoriteAppBarButton"/>
500 <Setter Property="AutomationProperties.Name" Value="Favorite"/>
501 <Setter Property="Content" Value=""/>
503 <Style x:Key="PhotoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
504 <Setter Property="AutomationProperties.AutomationId" Value="PhotoAppBarButton"/>
505 <Setter Property="AutomationProperties.Name" Value="Photo"/>
506 <Setter Property="Content" Value=""/>
508 <Style x:Key="SettingsAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
509 <Setter Property="AutomationProperties.AutomationId" Value="SettingsAppBarButton"/>
510 <Setter Property="AutomationProperties.Name" Value="Settings"/>
511 <Setter Property="Content" Value=""/>
513 <Style x:Key="VideoAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
514 <Setter Property="AutomationProperties.AutomationId" Value="VideoAppBarButton"/>
515 <Setter Property="AutomationProperties.Name" Value="Video"/>
516 <Setter Property="Content" Value=""/>
518 <Style x:Key="RefreshAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
519 <Setter Property="AutomationProperties.AutomationId" Value="RefreshAppBarButton"/>
520 <Setter Property="AutomationProperties.Name" Value="Refresh"/>
521 <Setter Property="Content" Value=""/>
523 <Style x:Key="DownloadAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
524 <Setter Property="AutomationProperties.AutomationId" Value="DownloadAppBarButton"/>
525 <Setter Property="AutomationProperties.Name" Value="Download"/>
526 <Setter Property="Content" Value=""/>
528 <Style x:Key="MailAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
529 <Setter Property="AutomationProperties.AutomationId" Value="MailAppBarButton"/>
530 <Setter Property="AutomationProperties.Name" Value="Mail"/>
531 <Setter Property="Content" Value=""/>
533 <Style x:Key="SearchAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
534 <Setter Property="AutomationProperties.AutomationId" Value="SearchAppBarButton"/>
535 <Setter Property="AutomationProperties.Name" Value="Search"/>
536 <Setter Property="Content" Value=""/>
538 <Style x:Key="HelpAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
539 <Setter Property="AutomationProperties.AutomationId" Value="HelpAppBarButton"/>
540 <Setter Property="AutomationProperties.Name" Value="Help"/>
541 <Setter Property="Content" Value=""/>
543 <Style x:Key="UploadAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
544 <Setter Property="AutomationProperties.AutomationId" Value="UploadAppBarButton"/>
545 <Setter Property="AutomationProperties.Name" Value="Upload"/>
546 <Setter Property="Content" Value=""/>
548 <Style x:Key="PinAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
549 <Setter Property="AutomationProperties.AutomationId" Value="PinAppBarButton"/>
550 <Setter Property="AutomationProperties.Name" Value="Pin"/>
551 <Setter Property="Content" Value=""/>
553 <Style x:Key="UnpinAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
554 <Setter Property="AutomationProperties.AutomationId" Value="UnpinAppBarButton"/>
555 <Setter Property="AutomationProperties.Name" Value="Unpin"/>
556 <Setter Property="Content" Value=""/>
559 <!-- Title area styles -->
561 <Style x:Key="PageHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource HeaderTextStyle}">
562 <Setter Property="TextWrapping" Value="NoWrap"/>
563 <Setter Property="VerticalAlignment" Value="Bottom"/>
564 <Setter Property="Margin" Value="0,0,40,40"/>
567 <Style x:Key="PageSubheaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource SubheaderTextStyle}">
568 <Setter Property="TextWrapping" Value="NoWrap"/>
569 <Setter Property="VerticalAlignment" Value="Bottom"/>
570 <Setter Property="Margin" Value="0,0,0,40"/>
573 <Style x:Key="SnappedPageHeaderTextStyle" TargetType="TextBlock" BasedOn="{StaticResource PageSubheaderTextStyle}">
574 <Setter Property="Margin" Value="0,0,18,40"/>
578 BackButtonStyle is used to style a Button for use in the title area of a page. Margins appropriate for
579 the conventional page layout are included as part of the style.
581 <Style x:Key="BackButtonStyle" TargetType="Button">
582 <Setter Property="MinWidth" Value="0"/>
583 <Setter Property="Width" Value="48"/>
584 <Setter Property="Height" Value="48"/>
585 <Setter Property="Margin" Value="36,0,36,36"/>
586 <Setter Property="VerticalAlignment" Value="Bottom"/>
587 <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
588 <Setter Property="FontWeight" Value="Normal"/>
589 <Setter Property="FontSize" Value="56"/>
590 <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>
591 <Setter Property="AutomationProperties.Name" Value="Back"/>
592 <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>
593 <Setter Property="Template">
595 <ControlTemplate TargetType="Button">
596 <Grid x:Name="RootGrid">
597 <Grid Margin="-1,-16,0,0">
598 <TextBlock x:Name="BackgroundGlyph" Text="" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>
599 <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>
600 <TextBlock x:Name="ArrowGlyph" Text="" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>
603 x:Name="FocusVisualWhite"
604 IsHitTestVisible="False"
605 Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
606 StrokeEndLineCap="Square"
607 StrokeDashArray="1,1"
609 StrokeDashOffset="1.5"/>
611 x:Name="FocusVisualBlack"
612 IsHitTestVisible="False"
613 Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
614 StrokeEndLineCap="Square"
615 StrokeDashArray="1,1"
617 StrokeDashOffset="0.5"/>
619 <VisualStateManager.VisualStateGroups>
620 <VisualStateGroup x:Name="CommonStates">
621 <VisualState x:Name="Normal" />
622 <VisualState x:Name="PointerOver">
624 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
625 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>
626 </ObjectAnimationUsingKeyFrames>
627 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">
628 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>
629 </ObjectAnimationUsingKeyFrames>
632 <VisualState x:Name="Pressed">
634 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
635 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>
636 </ObjectAnimationUsingKeyFrames>
638 Storyboard.TargetName="ArrowGlyph"
639 Storyboard.TargetProperty="Opacity"
643 Storyboard.TargetName="NormalGlyph"
644 Storyboard.TargetProperty="Opacity"
649 <VisualState x:Name="Disabled">
651 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
652 <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
653 </ObjectAnimationUsingKeyFrames>
657 <VisualStateGroup x:Name="FocusStates">
658 <VisualState x:Name="Focused">
661 Storyboard.TargetName="FocusVisualWhite"
662 Storyboard.TargetProperty="Opacity"
666 Storyboard.TargetName="FocusVisualBlack"
667 Storyboard.TargetProperty="Opacity"
672 <VisualState x:Name="Unfocused" />
673 <VisualState x:Name="PointerFocused" />
675 </VisualStateManager.VisualStateGroups>
683 PortraitBackButtonStyle is used to style a Button for use in the title area of a portrait page. Margins appropriate
684 for the conventional page layout are included as part of the style.
686 <Style x:Key="PortraitBackButtonStyle" TargetType="Button" BasedOn="{StaticResource BackButtonStyle}">
687 <Setter Property="Margin" Value="26,0,26,36"/>
691 SnappedBackButtonStyle is used to style a Button for use in the title area of a snapped page. Margins appropriate
692 for the conventional page layout are included as part of the style.
694 The obvious duplication here is necessary as the glyphs used in snapped are not merely smaller versions of the same
695 glyph but are actually distinct.
697 <Style x:Key="SnappedBackButtonStyle" TargetType="Button">
698 <Setter Property="MinWidth" Value="0"/>
699 <Setter Property="Margin" Value="20,0,0,0"/>
700 <Setter Property="VerticalAlignment" Value="Bottom"/>
701 <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
702 <Setter Property="FontWeight" Value="Normal"/>
703 <Setter Property="FontSize" Value="26.66667"/>
704 <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>
705 <Setter Property="AutomationProperties.Name" Value="Back"/>
706 <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>
707 <Setter Property="Template">
709 <ControlTemplate TargetType="Button">
710 <Grid x:Name="RootGrid" Width="36" Height="36" Margin="-3,0,7,33">
711 <Grid Margin="-1,-1,0,0">
712 <TextBlock x:Name="BackgroundGlyph" Text="" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>
713 <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonSnappedGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>
714 <TextBlock x:Name="ArrowGlyph" Text="" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>
717 x:Name="FocusVisualWhite"
718 IsHitTestVisible="False"
719 Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
720 StrokeEndLineCap="Square"
721 StrokeDashArray="1,1"
723 StrokeDashOffset="1.5"/>
725 x:Name="FocusVisualBlack"
726 IsHitTestVisible="False"
727 Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
728 StrokeEndLineCap="Square"
729 StrokeDashArray="1,1"
731 StrokeDashOffset="0.5"/>
733 <VisualStateManager.VisualStateGroups>
734 <VisualStateGroup x:Name="CommonStates">
735 <VisualState x:Name="Normal" />
736 <VisualState x:Name="PointerOver">
738 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
739 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>
740 </ObjectAnimationUsingKeyFrames>
741 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">
742 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>
743 </ObjectAnimationUsingKeyFrames>
746 <VisualState x:Name="Pressed">
748 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
749 <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>
750 </ObjectAnimationUsingKeyFrames>
752 Storyboard.TargetName="ArrowGlyph"
753 Storyboard.TargetProperty="Opacity"
757 Storyboard.TargetName="NormalGlyph"
758 Storyboard.TargetProperty="Opacity"
763 <VisualState x:Name="Disabled">
765 <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
766 <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
767 </ObjectAnimationUsingKeyFrames>
771 <VisualStateGroup x:Name="FocusStates">
772 <VisualState x:Name="Focused">
775 Storyboard.TargetName="FocusVisualWhite"
776 Storyboard.TargetProperty="Opacity"
780 Storyboard.TargetName="FocusVisualBlack"
781 Storyboard.TargetProperty="Opacity"
786 <VisualState x:Name="Unfocused" />
787 <VisualState x:Name="PointerFocused" />
789 </VisualStateManager.VisualStateGroups>
796 <!-- Item templates -->
798 <!-- Grid-appropriate 250 pixel square item template as seen in the GroupedItemsPage and ItemsPage -->
799 <DataTemplate x:Key="Standard250x250ItemTemplate">
800 <Grid HorizontalAlignment="Left" Width="250" Height="250">
801 <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
802 <Image Source="{Binding Image}" Stretch="UniformToFill"/>
804 <StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}">
805 <TextBlock Text="{Binding Title}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Height="60" Margin="15,0,15,0"/>
806 <TextBlock Text="{Binding Subtitle}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,0,15,10"/>
811 <!-- Grid-appropriate 500 by 130 pixel item template as seen in the GroupDetailPage -->
812 <DataTemplate x:Key="Standard500x130ItemTemplate">
813 <Grid Height="110" Width="480" Margin="10">
814 <Grid.ColumnDefinitions>
815 <ColumnDefinition Width="Auto"/>
816 <ColumnDefinition Width="*"/>
817 </Grid.ColumnDefinitions>
818 <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
819 <Image Source="{Binding Image}" Stretch="UniformToFill"/>
821 <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
822 <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
823 <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
824 <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
829 <!-- List-appropriate 130 pixel high item template as seen in the SplitPage -->
830 <DataTemplate x:Key="Standard130ItemTemplate">
831 <Grid Height="110" Margin="6">
832 <Grid.ColumnDefinitions>
833 <ColumnDefinition Width="Auto"/>
834 <ColumnDefinition Width="*"/>
835 </Grid.ColumnDefinitions>
836 <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
837 <Image Source="{Binding Image}" Stretch="UniformToFill"/>
839 <StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
840 <TextBlock Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"/>
841 <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
842 <TextBlock Text="{Binding Description}" Style="{StaticResource BodyTextStyle}" MaxHeight="60"/>
848 List-appropriate 80 pixel high item template as seen in the SplitPage when Filled, and
849 the following pages when snapped: GroupedItemsPage, GroupDetailPage, and ItemsPage
851 <DataTemplate x:Key="Standard80ItemTemplate">
853 <Grid.ColumnDefinitions>
854 <ColumnDefinition Width="Auto"/>
855 <ColumnDefinition Width="*"/>
856 </Grid.ColumnDefinitions>
857 <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="60" Height="60">
858 <Image Source="{Binding Image}" Stretch="UniformToFill"/>
860 <StackPanel Grid.Column="1" Margin="10,0,0,0">
861 <TextBlock Text="{Binding Title}" Style="{StaticResource ItemTextStyle}" MaxHeight="40"/>
862 <TextBlock Text="{Binding Subtitle}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap"/>
867 <!-- Grid-appropriate 300 by 70 pixel item template as seen in the SearchResultsPage -->
868 <DataTemplate x:Key="StandardSmallIcon300x70ItemTemplate">
870 <Grid.ColumnDefinitions>
871 <ColumnDefinition Width="Auto"/>
872 <ColumnDefinition Width="*"/>
873 </Grid.ColumnDefinitions>
874 <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="10,10,0,20" Width="40" Height="40">
875 <Image Source="{Binding Image}" Stretch="UniformToFill"/>
877 <StackPanel Grid.Column="1" Margin="10,0,10,10">
878 <TextBlock Text="{Binding Title}" Style="{StaticResource BodyTextStyle}" TextWrapping="NoWrap"/>
879 <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" Height="40"/>
884 <!-- List-appropriate 70 pixel high item template as seen in the SearchResultsPage when Snapped -->
885 <DataTemplate x:Key="StandardSmallIcon70ItemTemplate">
887 <Grid.ColumnDefinitions>
888 <ColumnDefinition Width="Auto"/>
889 <ColumnDefinition Width="*"/>
890 </Grid.ColumnDefinitions>
891 <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="0,0,0,10" Width="40" Height="40">
892 <Image Source="{Binding Image}" Stretch="UniformToFill"/>
894 <StackPanel Grid.Column="1" Margin="10,-10,0,0">
895 <TextBlock Text="{Binding Title}" Style="{StaticResource BodyTextStyle}" TextWrapping="NoWrap"/>
896 <TextBlock Text="{Binding Subtitle}" Style="{StaticResource BodyTextStyle}" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" Height="40"/>
902 190x130 pixel item template for displaying file previews as seen in the FileOpenPickerPage
903 Includes an elaborate tooltip to display title and description text
905 <DataTemplate x:Key="StandardFileWithTooltip190x130ItemTemplate">
907 <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
909 Source="{Binding Image}"
912 HorizontalAlignment="Center"
913 VerticalAlignment="Center"
916 <ToolTipService.Placement>Mouse</ToolTipService.Placement>
917 <ToolTipService.ToolTip>
918 <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
919 <Grid.ColumnDefinitions>
920 <ColumnDefinition Width="Auto"/>
921 <ColumnDefinition Width="*"/>
922 </Grid.ColumnDefinitions>
924 <Grid Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Margin="20">
926 Source="{Binding Image}"
929 HorizontalAlignment="Center"
930 VerticalAlignment="Center"
933 <StackPanel Width="200" Grid.Column="1" Margin="0,20,20,20">
934 <TextBlock Text="{Binding Title}" TextWrapping="NoWrap" Style="{StaticResource BodyTextStyle}"/>
935 <TextBlock Text="{Binding Description}" MaxHeight="140" Foreground="{StaticResource ApplicationSecondaryForegroundThemeBrush}" Style="{StaticResource BodyTextStyle}"/>
938 </ToolTipService.ToolTip>
942 <!-- Default to 10-pixel spacing between grid items (after accounting for 4-pixel insets for focus) -->
944 <Style TargetType="GridViewItem">
945 <Setter Property="Margin" Value="0,0,2,2" />
948 <!-- ScrollViewer styles -->
950 <Style x:Key="HorizontalScrollViewerStyle" TargetType="ScrollViewer">
951 <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
952 <Setter Property="VerticalScrollBarVisibility" Value="Disabled"/>
953 <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Enabled" />
954 <Setter Property="ScrollViewer.VerticalScrollMode" Value="Disabled" />
955 <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
958 <Style x:Key="VerticalScrollViewerStyle" TargetType="ScrollViewer">
959 <Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>
960 <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
961 <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
962 <Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled" />
963 <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
966 <!-- Page layout roots typically use entrance animations and a theme-appropriate background color -->
968 <Style x:Key="LayoutRootStyle" TargetType="Panel">
969 <Setter Property="Background" Value="{StaticResource ApplicationPageBackgroundThemeBrush}"/>
970 <Setter Property="ChildrenTransitions">
972 <TransitionCollection>
973 <EntranceThemeTransition/>
974 </TransitionCollection>
978 </ResourceDictionary>