|
1 | 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
2 | | - <Style |
3 | | - x:Key="ToolBarButtonStyle" |
4 | | - BasedOn="{StaticResource DefaultButtonStyle}" |
5 | | - TargetType="Button"> |
6 | | - <Setter Property="Background" Value="{ThemeResource ButtonBackground}" /> |
7 | | - <Setter Property="BackgroundSizing" Value="InnerBorderEdge" /> |
8 | | - <Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" /> |
9 | | - <Setter Property="BorderBrush" Value="Transparent" /> |
10 | | - <Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" /> |
11 | | - <Setter Property="Padding" Value="0" /> |
12 | | - <Setter Property="HorizontalAlignment" Value="Left" /> |
13 | | - <Setter Property="VerticalAlignment" Value="Center" /> |
14 | | - <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" /> |
15 | | - <Setter Property="FontWeight" Value="Normal" /> |
16 | | - <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" /> |
17 | | - <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" /> |
18 | | - <Setter Property="FocusVisualMargin" Value="-3" /> |
19 | | - <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" /> |
20 | | - <Setter Property="Template"> |
21 | | - <Setter.Value> |
22 | | - <ControlTemplate TargetType="Button"> |
23 | | - <ContentPresenter |
24 | | - x:Name="ContentPresenter" |
25 | | - Padding="{TemplateBinding Padding}" |
26 | | - HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
27 | | - VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
28 | | - AutomationProperties.AccessibilityView="Raw" |
29 | | - Background="{TemplateBinding Background}" |
30 | | - BackgroundSizing="{TemplateBinding BackgroundSizing}" |
31 | | - BorderBrush="{TemplateBinding BorderBrush}" |
32 | | - BorderThickness="{TemplateBinding BorderThickness}" |
33 | | - Content="{TemplateBinding Content}" |
34 | | - ContentTemplate="{TemplateBinding ContentTemplate}" |
35 | | - ContentTransitions="{TemplateBinding ContentTransitions}" |
36 | | - CornerRadius="{TemplateBinding CornerRadius}"> |
37 | | - <ContentPresenter.Resources> |
38 | | - <ResourceDictionary> |
39 | | - <ResourceDictionary.ThemeDictionaries> |
40 | | - <ResourceDictionary x:Key="Default"> |
41 | | - <!-- Make border brushes always transparent --> |
42 | | - <SolidColorBrush x:Key="ButtonBorderBrushDisabled" Color="Transparent" /> |
43 | | - <SolidColorBrush x:Key="ButtonBackgroundDisabled" Color="Transparent" /> |
44 | | - </ResourceDictionary> |
45 | | - </ResourceDictionary.ThemeDictionaries> |
46 | | - </ResourceDictionary> |
47 | | - </ContentPresenter.Resources> |
48 | | - |
49 | | - <VisualStateManager.VisualStateGroups> |
50 | | - <VisualStateGroup x:Name="CommonStates"> |
51 | | - <VisualState x:Name="Normal" /> |
52 | | - |
53 | | - <VisualState x:Name="PointerOver"> |
54 | | - <Storyboard> |
55 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> |
56 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundPointerOver}" /> |
57 | | - </ObjectAnimationUsingKeyFrames> |
58 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> |
59 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushPointerOver}" /> |
60 | | - </ObjectAnimationUsingKeyFrames> |
61 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> |
62 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundPointerOver}" /> |
63 | | - </ObjectAnimationUsingKeyFrames> |
64 | | - </Storyboard> |
65 | | - </VisualState> |
66 | | - |
67 | | - <VisualState x:Name="Pressed"> |
68 | | - <Storyboard> |
69 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> |
70 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundPressed}" /> |
71 | | - </ObjectAnimationUsingKeyFrames> |
72 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> |
73 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushPressed}" /> |
74 | | - </ObjectAnimationUsingKeyFrames> |
75 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> |
76 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundPressed}" /> |
77 | | - </ObjectAnimationUsingKeyFrames> |
78 | | - </Storyboard> |
79 | | - </VisualState> |
80 | | - |
81 | | - <VisualState x:Name="Disabled"> |
82 | | - <Storyboard> |
83 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> |
84 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundDisabled}" /> |
85 | | - </ObjectAnimationUsingKeyFrames> |
86 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> |
87 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushDisabled}" /> |
88 | | - </ObjectAnimationUsingKeyFrames> |
89 | | - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> |
90 | | - <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundDisabled}" /> |
91 | | - </ObjectAnimationUsingKeyFrames> |
92 | | - </Storyboard> |
93 | | - </VisualState> |
94 | | - </VisualStateGroup> |
95 | | - </VisualStateManager.VisualStateGroups> |
96 | | - </ContentPresenter> |
97 | | - </ControlTemplate> |
98 | | - </Setter.Value> |
99 | | - </Setter> |
100 | | - </Style> |
101 | 2 | <Style |
102 | 3 | x:Key="ToolBarAppBarButtonFlyoutStyle" |
103 | 4 | BasedOn="{StaticResource DefaultAppBarButtonStyle}" |
|
0 commit comments