|
55 | 55 | </Setter.Value> |
56 | 56 | </Setter> |
57 | 57 | </Style> |
| 58 | + |
| 59 | + <Style |
| 60 | + x:Key="MyEllipsisButtonStyle" |
| 61 | + BasedOn="{StaticResource EllipsisButton}" |
| 62 | + TargetType="Button"> |
| 63 | + <Setter Property="Width" Value="{x:Null}" /> |
| 64 | + <Setter Property="Height" Value="36" /> |
| 65 | + <Setter Property="VerticalAlignment" Value="Center" /> |
| 66 | + <Setter Property="Template"> |
| 67 | + <Setter.Value> |
| 68 | + <ControlTemplate TargetType="Button"> |
| 69 | + <Grid Background="Transparent"> |
| 70 | + <ContentPresenter |
| 71 | + x:Name="ContentPresenter" |
| 72 | + Padding="{ThemeResource ButtonPadding}" |
| 73 | + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 74 | + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
| 75 | + AutomationProperties.AccessibilityView="Raw" |
| 76 | + Background="{TemplateBinding Background}" |
| 77 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 78 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 79 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 80 | + ContentTransitions="{TemplateBinding ContentTransitions}" |
| 81 | + Control.IsTemplateFocusTarget="True" |
| 82 | + CornerRadius="{TemplateBinding CornerRadius}" |
| 83 | + Foreground="{TemplateBinding Foreground}" /> |
| 84 | + |
| 85 | + <VisualStateManager.VisualStateGroups> |
| 86 | + <VisualStateGroup x:Name="CommonStates"> |
| 87 | + <VisualState x:Name="Normal" /> |
| 88 | + |
| 89 | + <VisualState x:Name="PointerOver"> |
| 90 | + |
| 91 | + <Storyboard> |
| 92 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> |
| 93 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonBackgroundPointerOver}" /> |
| 94 | + </ObjectAnimationUsingKeyFrames> |
| 95 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> |
| 96 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonForegroundPointerOver}" /> |
| 97 | + </ObjectAnimationUsingKeyFrames> |
| 98 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> |
| 99 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonBorderBrushPointerOver}" /> |
| 100 | + </ObjectAnimationUsingKeyFrames> |
| 101 | + </Storyboard> |
| 102 | + </VisualState> |
| 103 | + |
| 104 | + <VisualState x:Name="Pressed"> |
| 105 | + |
| 106 | + <Storyboard> |
| 107 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> |
| 108 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonBackgroundPressed}" /> |
| 109 | + </ObjectAnimationUsingKeyFrames> |
| 110 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> |
| 111 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonForegroundPressed}" /> |
| 112 | + </ObjectAnimationUsingKeyFrames> |
| 113 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> |
| 114 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonBorderBrushPressed}" /> |
| 115 | + </ObjectAnimationUsingKeyFrames> |
| 116 | + </Storyboard> |
| 117 | + </VisualState> |
| 118 | + |
| 119 | + <VisualState x:Name="Disabled"> |
| 120 | + |
| 121 | + <Storyboard> |
| 122 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> |
| 123 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonBackgroundDisabled}" /> |
| 124 | + </ObjectAnimationUsingKeyFrames> |
| 125 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> |
| 126 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonForegroundDisabled}" /> |
| 127 | + </ObjectAnimationUsingKeyFrames> |
| 128 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> |
| 129 | + <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonBorderBrushDisabled}" /> |
| 130 | + </ObjectAnimationUsingKeyFrames> |
| 131 | + </Storyboard> |
| 132 | + </VisualState> |
| 133 | + |
| 134 | + </VisualStateGroup> |
| 135 | + |
| 136 | + </VisualStateManager.VisualStateGroups> |
| 137 | + </Grid> |
| 138 | + |
| 139 | + </ControlTemplate> |
| 140 | + </Setter.Value> |
| 141 | + </Setter> |
| 142 | + </Style> |
58 | 143 | </ResourceDictionary> |
59 | 144 | </Application.Resources> |
60 | 145 | </Application> |
0 commit comments