|
35 | 35 | BorderThickness="{TemplateBinding BorderThickness}"
|
36 | 36 | Control.IsTemplateFocusTarget="True"
|
37 | 37 | CornerRadius="{TemplateBinding CornerRadius}">
|
38 |
| - |
39 | 38 | <Border.BackgroundTransition>
|
40 | 39 | <BrushTransition Duration="0:0:0.083" />
|
41 | 40 | </Border.BackgroundTransition>
|
42 | 41 | </Border>
|
43 |
| - |
44 | 42 | <Grid x:Name="ContentRoot" MinHeight="{ThemeResource AppBarThemeMinHeight}">
|
45 |
| - |
46 | 43 | <Grid.ColumnDefinitions>
|
47 |
| - <ColumnDefinition Width="30" /> |
| 44 | + <ColumnDefinition Width="*" /> |
48 | 45 | <ColumnDefinition Width="Auto" />
|
49 | 46 | <ColumnDefinition Width="Auto" />
|
50 | 47 | </Grid.ColumnDefinitions>
|
51 |
| - |
52 | 48 | <Grid.RowDefinitions>
|
53 | 49 | <RowDefinition Height="Auto" />
|
54 | 50 | <RowDefinition Height="Auto" />
|
|
90 | 86 | TextTrimming="Clip"
|
91 | 87 | TextWrapping="NoWrap"
|
92 | 88 | Visibility="Collapsed" />
|
93 |
| - <FontIcon |
94 |
| - x:Name="FlyoutItemChevron" |
95 |
| - Grid.Column="2" |
96 |
| - Margin="0,12,8,0" |
| 89 | + <TextBlock |
| 90 | + x:Name="KeyboardAcceleratorTextLabel" |
| 91 | + Grid.Column="1" |
| 92 | + MinWidth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.KeyboardAcceleratorTextMinWidth}" |
| 93 | + Margin="24,0,12,0" |
| 94 | + HorizontalAlignment="Right" |
97 | 95 | VerticalAlignment="Center"
|
98 | 96 | AutomationProperties.AccessibilityView="Raw"
|
99 |
| - FontFamily="{ThemeResource SymbolThemeFontFamily}" |
100 |
| - FontSize="{ThemeResource AppBarButtonSecondarySubItemChevronFontSize}" |
101 |
| - Foreground="{ThemeResource AppBarButtonSubItemChevronForeground}" |
102 |
| - Glyph="" /> |
103 |
| - <Grid |
104 |
| - x:Name="SubItemChevronPanel" |
105 |
| - Grid.Column="2" |
106 |
| - Visibility="Collapsed"> |
| 97 | + Foreground="{ThemeResource AppBarButtonKeyboardAcceleratorTextForeground}" |
| 98 | + Style="{ThemeResource CaptionTextBlockStyle}" |
| 99 | + Text="{TemplateBinding KeyboardAcceleratorTextOverride}" |
| 100 | + Visibility="Collapsed" /> |
| 101 | + <Grid x:Name="SubItemChevronPanel" Grid.Column="2"> |
107 | 102 | <FontIcon
|
108 | 103 | x:Name="SubItemChevron"
|
109 | 104 | Margin="{ThemeResource AppBarButtonSubItemChevronMargin}"
|
|
112 | 107 | FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
113 | 108 | FontSize="{ThemeResource AppBarButtonSubItemChevronFontSize}"
|
114 | 109 | Foreground="{ThemeResource AppBarButtonSubItemChevronForeground}"
|
115 |
| - Glyph="{ThemeResource AppBarButtonFlyoutGlyph}" |
116 |
| - MirroredWhenRightToLeft="True" /> |
| 110 | + Glyph="" |
| 111 | + MirroredWhenRightToLeft="True" |
| 112 | + Visibility="Collapsed" /> |
117 | 113 | <FontIcon
|
118 | 114 | x:Name="OverflowSubItemChevron"
|
119 | 115 | Margin="{ThemeResource AppBarButtonSecondarySubItemChevronMargin}"
|
|
134 | 130 | <VisualState.Setters>
|
135 | 131 | <Setter Target="AppBarButtonInnerBorder.Margin" Value="{StaticResource AppBarButtonInnerBorderCompactMargin}" />
|
136 | 132 | </VisualState.Setters>
|
137 |
| - |
138 | 133 | <Storyboard>
|
139 | 134 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
|
140 | 135 | <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
|
|
164 | 159 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SubItemChevron" Storyboard.TargetProperty="Margin">
|
165 | 160 | <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarButtonSubItemChevronLabelOnRightMargin}" />
|
166 | 161 | </ObjectAnimationUsingKeyFrames>
|
167 |
| - <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FlyoutItemChevron" Storyboard.TargetProperty="Margin"> |
168 |
| - <DiscreteObjectKeyFrame KeyTime="0" Value="-4,8,8,0" /> |
169 |
| - </ObjectAnimationUsingKeyFrames> |
170 | 162 | </Storyboard>
|
171 | 163 | </VisualState>
|
172 | 164 | <VisualState x:Name="LabelCollapsed">
|
173 | 165 | <Storyboard>
|
174 | 166 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="MinHeight">
|
175 | 167 | <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarThemeCompactHeight}" />
|
176 | 168 | </ObjectAnimationUsingKeyFrames>
|
| 169 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Width"> |
| 170 | + <DiscreteObjectKeyFrame KeyTime="0" Value="46" /> |
| 171 | + </ObjectAnimationUsingKeyFrames> |
177 | 172 | <ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
|
178 | 173 | <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
|
179 | 174 | </ObjectAnimationUsingKeyFrames>
|
| 175 | + <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SubItemChevron" Storyboard.TargetProperty="Margin"> |
| 176 | + <DiscreteObjectKeyFrame KeyTime="0" Value="0,20,8,0" /> |
| 177 | + </ObjectAnimationUsingKeyFrames> |
180 | 178 | </Storyboard>
|
181 | 179 | </VisualState>
|
182 | 180 | <VisualState x:Name="Overflow">
|
|
226 | 224 | <Setter Target="OverflowTextLabel.Margin" Value="76,0,12,0" />
|
227 | 225 | </VisualState.Setters>
|
228 | 226 | </VisualState>
|
229 |
| - |
230 | 227 | </VisualStateGroup>
|
231 | 228 | <VisualStateGroup x:Name="CommonStates">
|
232 | 229 | <VisualState x:Name="Normal" />
|
233 |
| - |
234 | 230 | <VisualState x:Name="PointerOver">
|
235 | 231 | <VisualState.Setters>
|
236 | 232 | <Setter Target="AppBarButtonInnerBorder.Background" Value="{ThemeResource AppBarButtonBackgroundPointerOver}" />
|
|
239 | 235 | <Setter Target="TextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundPointerOver}" />
|
240 | 236 | <Setter Target="OverflowTextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundPointerOver}" />
|
241 | 237 | <Setter Target="SubItemChevron.Foreground" Value="{ThemeResource AppBarButtonSubItemChevronForegroundPointerOver}" />
|
| 238 | + <Setter Target="KeyboardAcceleratorTextLabel.Foreground" Value="{ThemeResource AppBarButtonKeyboardAcceleratorTextForegroundPointerOver}" /> |
242 | 239 | </VisualState.Setters>
|
243 | 240 | </VisualState>
|
244 |
| - |
245 | 241 | <VisualState x:Name="Pressed">
|
246 | 242 | <VisualState.Setters>
|
247 | 243 | <Setter Target="AppBarButtonInnerBorder.Background" Value="{ThemeResource AppBarButtonBackgroundPressed}" />
|
|
250 | 246 | <Setter Target="TextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundPressed}" />
|
251 | 247 | <Setter Target="OverflowTextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundPressed}" />
|
252 | 248 | <Setter Target="SubItemChevron.Foreground" Value="{ThemeResource AppBarButtonSubItemChevronForegroundPressed}" />
|
| 249 | + <Setter Target="KeyboardAcceleratorTextLabel.Foreground" Value="{ThemeResource AppBarButtonKeyboardAcceleratorTextForegroundPressed}" /> |
253 | 250 | </VisualState.Setters>
|
254 | 251 | </VisualState>
|
255 |
| - |
256 | 252 | <VisualState x:Name="Disabled">
|
257 | 253 | <VisualState.Setters>
|
258 | 254 | <Setter Target="AppBarButtonInnerBorder.Background" Value="{ThemeResource AppBarButtonBackgroundDisabled}" />
|
|
261 | 257 | <Setter Target="TextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundDisabled}" />
|
262 | 258 | <Setter Target="OverflowTextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundDisabled}" />
|
263 | 259 | <Setter Target="SubItemChevron.Foreground" Value="{ThemeResource AppBarButtonSubItemChevronForegroundDisabled}" />
|
| 260 | + <Setter Target="KeyboardAcceleratorTextLabel.Foreground" Value="{ThemeResource AppBarButtonKeyboardAcceleratorTextForegroundDisabled}" /> |
264 | 261 | </VisualState.Setters>
|
265 | 262 | </VisualState>
|
266 | 263 | <VisualState x:Name="OverflowNormal">
|
|
276 | 273 | <Setter Target="Content.Foreground" Value="{ThemeResource AppBarButtonForegroundPointerOver}" />
|
277 | 274 | <Setter Target="TextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundPointerOver}" />
|
278 | 275 | <Setter Target="OverflowTextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundPointerOver}" />
|
| 276 | + <Setter Target="KeyboardAcceleratorTextLabel.Foreground" Value="{ThemeResource AppBarButtonKeyboardAcceleratorTextForegroundPointerOver}" /> |
279 | 277 | <Setter Target="SubItemChevron.Foreground" Value="{ThemeResource AppBarButtonSubItemChevronForegroundPointerOver}" />
|
280 | 278 | <Setter Target="SubItemChevron.Visibility" Value="Collapsed" />
|
281 | 279 | <Setter Target="OverflowSubItemChevron.Visibility" Value="Visible" />
|
|
288 | 286 | <Setter Target="Content.Foreground" Value="{ThemeResource AppBarButtonForegroundPressed}" />
|
289 | 287 | <Setter Target="TextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundPressed}" />
|
290 | 288 | <Setter Target="OverflowTextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundPressed}" />
|
| 289 | + <Setter Target="KeyboardAcceleratorTextLabel.Foreground" Value="{ThemeResource AppBarButtonKeyboardAcceleratorTextForegroundPressed}" /> |
291 | 290 | <Setter Target="SubItemChevron.Foreground" Value="{ThemeResource AppBarButtonSubItemChevronForegroundPressed}" />
|
292 | 291 | <Setter Target="SubItemChevron.Visibility" Value="Collapsed" />
|
293 | 292 | <Setter Target="OverflowSubItemChevron.Visibility" Value="Visible" />
|
|
300 | 299 | <Setter Target="Content.Foreground" Value="{ThemeResource AppBarButtonForegroundSubMenuOpened}" />
|
301 | 300 | <Setter Target="TextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundSubMenuOpened}" />
|
302 | 301 | <Setter Target="OverflowTextLabel.Foreground" Value="{ThemeResource AppBarButtonForegroundSubMenuOpened}" />
|
| 302 | + <Setter Target="KeyboardAcceleratorTextLabel.Foreground" Value="{ThemeResource AppBarButtonKeyboardAcceleratorTextForegroundSubMenuOpened}" /> |
303 | 303 | <Setter Target="SubItemChevron.Foreground" Value="{ThemeResource AppBarButtonSubItemChevronForegroundSubMenuOpened}" />
|
304 | 304 | <Setter Target="SubItemChevron.Visibility" Value="Collapsed" />
|
305 | 305 | <Setter Target="OverflowSubItemChevron.Visibility" Value="Visible" />
|
306 | 306 | </VisualState.Setters>
|
307 | 307 | </VisualState>
|
308 |
| - |
309 | 308 | </VisualStateGroup>
|
310 | 309 | <VisualStateGroup x:Name="InputModeStates">
|
311 | 310 | <VisualState x:Name="InputModeDefault" />
|
|
319 | 318 | <Setter Target="OverflowTextLabel.Padding" Value="{ThemeResource AppBarButtonOverflowTextTouchMargin}" />
|
320 | 319 | </VisualState.Setters>
|
321 | 320 | </VisualState>
|
322 |
| - |
| 321 | + </VisualStateGroup> |
| 322 | + <VisualStateGroup x:Name="KeyboardAcceleratorTextVisibility"> |
| 323 | + <VisualState x:Name="KeyboardAcceleratorTextCollapsed" /> |
| 324 | + <VisualState x:Name="KeyboardAcceleratorTextVisible"> |
| 325 | + <VisualState.Setters> |
| 326 | + <Setter Target="KeyboardAcceleratorTextLabel.Visibility" Value="Visible" /> |
| 327 | + </VisualState.Setters> |
| 328 | + </VisualState> |
323 | 329 | </VisualStateGroup>
|
324 | 330 | <VisualStateGroup x:Name="FlyoutStates">
|
325 |
| - <VisualState x:Name="NoFlyout" /> |
| 331 | + <VisualState x:Name="NoFlyout"> |
| 332 | + <VisualState.Setters> |
| 333 | + <Setter Target="SubItemChevronPanel.Visibility" Value="Collapsed" /> |
| 334 | + </VisualState.Setters> |
| 335 | + </VisualState> |
326 | 336 | <VisualState x:Name="HasFlyout">
|
327 | 337 | <VisualState.Setters>
|
328 |
| - <Setter Target="SubItemChevronPanel.Visibility" Value="{ThemeResource AppBarButtonHasFlyoutChevronVisibility}" /> |
| 338 | + <Setter Target="SubItemChevronPanel.Visibility" Value="Visible" /> |
| 339 | + <Setter Target="SubItemChevron.Visibility" Value="Visible" /> |
| 340 | + <Setter Target="OverflowSubItemChevron.Visibility" Value="Collapsed" /> |
329 | 341 | </VisualState.Setters>
|
330 | 342 | </VisualState>
|
331 | 343 | </VisualStateGroup>
|
332 |
| - |
333 | 344 | </VisualStateManager.VisualStateGroups>
|
334 | 345 | </Grid>
|
335 |
| - |
336 | 346 | </ControlTemplate>
|
337 | 347 | </Setter.Value>
|
338 | 348 | </Setter>
|
|
0 commit comments