|
263 | 263 | </AnimatedIcon> |
264 | 264 | </ToggleButton> |
265 | 265 |
|
266 | | - <Button |
267 | | - x:Name="Back" |
268 | | - AccessKey="B" |
269 | | - AccessKeyInvoked="Button_AccessKeyInvoked" |
270 | | - AutomationProperties.FullDescription="{x:Bind ViewModel.Commands.NavigateBack.Description, Mode=OneWay}" |
271 | | - AutomationProperties.Name="{x:Bind ViewModel.Commands.NavigateBack.Label, Mode=OneWay}" |
272 | | - Command="{x:Bind ViewModel.Commands.NavigateBack, Mode=OneWay}" |
273 | | - IsEnabled="{x:Bind ViewModel.Commands.NavigateBack.IsExecutable, Mode=OneWay}" |
274 | | - Style="{StaticResource AddressToolbarButtonStyle}" |
275 | | - ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateBack.LabelWithHotKey, Mode=OneWay}"> |
276 | | - <FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateBack.Glyph.BaseGlyph, Mode=OneWay}" /> |
277 | | - <Button.ContextFlyout> |
278 | | - <MenuFlyout |
279 | | - x:Name="BackHistoryFlyout" |
280 | | - Opening="BackHistoryFlyout_Opening" |
281 | | - Placement="BottomEdgeAlignedLeft" |
282 | | - ScrollViewer.VerticalScrollBarVisibility="Auto" |
283 | | - ScrollViewer.VerticalScrollMode="Auto"> |
284 | | - <MenuFlyout.MenuFlyoutPresenterStyle> |
285 | | - <Style TargetType="MenuFlyoutPresenter"> |
286 | | - <Setter Property="MaxHeight" Value="400" /> |
287 | | - <!-- Workaround for https://github.com/files-community/Files/issues/13078 --> |
288 | | - <Setter Target="HighContrastAdjustment" Value="None" /> |
289 | | - </Style> |
290 | | - </MenuFlyout.MenuFlyoutPresenterStyle> |
291 | | - </MenuFlyout> |
292 | | - </Button.ContextFlyout> |
293 | | - </Button> |
294 | | - |
295 | | - <Button |
296 | | - x:Name="Forward" |
297 | | - AccessKey="F" |
298 | | - AccessKeyInvoked="Button_AccessKeyInvoked" |
299 | | - AutomationProperties.FullDescription="{x:Bind ViewModel.Commands.NavigateForward.Description, Mode=OneWay}" |
300 | | - AutomationProperties.Name="{x:Bind ViewModel.Commands.NavigateForward.Label, Mode=OneWay}" |
301 | | - Command="{x:Bind ViewModel.Commands.NavigateForward, Mode=OneWay}" |
302 | | - IsEnabled="{x:Bind ViewModel.Commands.NavigateForward.IsExecutable, Mode=OneWay}" |
303 | | - Style="{StaticResource AddressToolbarButtonStyle}" |
304 | | - ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateForward.LabelWithHotKey, Mode=OneWay}"> |
305 | | - <FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateForward.Glyph.BaseGlyph, Mode=OneWay}" /> |
306 | | - <Button.ContextFlyout> |
307 | | - <MenuFlyout |
308 | | - x:Name="ForwardHistoryFlyout" |
309 | | - Opening="ForwardHistoryFlyout_Opening" |
310 | | - Placement="BottomEdgeAlignedLeft" |
311 | | - ScrollViewer.VerticalScrollBarVisibility="Auto" |
312 | | - ScrollViewer.VerticalScrollMode="Auto"> |
313 | | - <MenuFlyout.MenuFlyoutPresenterStyle> |
314 | | - <Style TargetType="MenuFlyoutPresenter"> |
315 | | - <Setter Property="MaxHeight" Value="400" /> |
316 | | - <!-- Workaround for https://github.com/files-community/Files/issues/13078 --> |
317 | | - <Setter Target="HighContrastAdjustment" Value="None" /> |
318 | | - </Style> |
319 | | - </MenuFlyout.MenuFlyoutPresenterStyle> |
320 | | - </MenuFlyout> |
321 | | - </Button.ContextFlyout> |
322 | | - </Button> |
| 266 | + <StackPanel |
| 267 | + Orientation="Horizontal" |
| 268 | + x:Name="NavigationButtons" |
| 269 | + FlowDirection="{Binding Path=FlowDirection, ElementName=Root}"> |
| 270 | + <Button |
| 271 | + x:Name="Back" |
| 272 | + AccessKey="B" |
| 273 | + AccessKeyInvoked="Button_AccessKeyInvoked" |
| 274 | + AutomationProperties.FullDescription="{x:Bind ViewModel.Commands.NavigateBack.Description, Mode=OneWay}" |
| 275 | + AutomationProperties.Name="{x:Bind ViewModel.Commands.NavigateBack.Label, Mode=OneWay}" |
| 276 | + Command="{x:Bind ViewModel.Commands.NavigateBack, Mode=OneWay}" |
| 277 | + IsEnabled="{x:Bind ViewModel.Commands.NavigateBack.IsExecutable, Mode=OneWay}" |
| 278 | + Style="{StaticResource AddressToolbarButtonStyle}" |
| 279 | + ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateBack.LabelWithHotKey, Mode=OneWay}"> |
| 280 | + <FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateBack.Glyph.BaseGlyph, Mode=OneWay}" /> |
| 281 | + <Button.ContextFlyout> |
| 282 | + <MenuFlyout |
| 283 | + x:Name="BackHistoryFlyout" |
| 284 | + Opening="BackHistoryFlyout_Opening" |
| 285 | + Placement="BottomEdgeAlignedLeft" |
| 286 | + ScrollViewer.VerticalScrollBarVisibility="Auto" |
| 287 | + ScrollViewer.VerticalScrollMode="Auto"> |
| 288 | + <MenuFlyout.MenuFlyoutPresenterStyle> |
| 289 | + <Style TargetType="MenuFlyoutPresenter"> |
| 290 | + <Setter Property="MaxHeight" Value="400" /> |
| 291 | + <!-- Workaround for https://github.com/files-community/Files/issues/13078 --> |
| 292 | + <Setter Target="HighContrastAdjustment" Value="None" /> |
| 293 | + </Style> |
| 294 | + </MenuFlyout.MenuFlyoutPresenterStyle> |
| 295 | + </MenuFlyout> |
| 296 | + </Button.ContextFlyout> |
| 297 | + </Button> |
| 298 | + |
| 299 | + <Button |
| 300 | + x:Name="Forward" |
| 301 | + AccessKey="F" |
| 302 | + AccessKeyInvoked="Button_AccessKeyInvoked" |
| 303 | + AutomationProperties.FullDescription="{x:Bind ViewModel.Commands.NavigateForward.Description, Mode=OneWay}" |
| 304 | + AutomationProperties.Name="{x:Bind ViewModel.Commands.NavigateForward.Label, Mode=OneWay}" |
| 305 | + Command="{x:Bind ViewModel.Commands.NavigateForward, Mode=OneWay}" |
| 306 | + IsEnabled="{x:Bind ViewModel.Commands.NavigateForward.IsExecutable, Mode=OneWay}" |
| 307 | + Style="{StaticResource AddressToolbarButtonStyle}" |
| 308 | + ToolTipService.ToolTip="{x:Bind ViewModel.Commands.NavigateForward.LabelWithHotKey, Mode=OneWay}"> |
| 309 | + <FontIcon FontSize="14" Glyph="{x:Bind ViewModel.Commands.NavigateForward.Glyph.BaseGlyph, Mode=OneWay}" /> |
| 310 | + <Button.ContextFlyout> |
| 311 | + <MenuFlyout |
| 312 | + x:Name="ForwardHistoryFlyout" |
| 313 | + Opening="ForwardHistoryFlyout_Opening" |
| 314 | + Placement="BottomEdgeAlignedLeft" |
| 315 | + ScrollViewer.VerticalScrollBarVisibility="Auto" |
| 316 | + ScrollViewer.VerticalScrollMode="Auto"> |
| 317 | + <MenuFlyout.MenuFlyoutPresenterStyle> |
| 318 | + <Style TargetType="MenuFlyoutPresenter"> |
| 319 | + <Setter Property="MaxHeight" Value="400" /> |
| 320 | + <!-- Workaround for https://github.com/files-community/Files/issues/13078 --> |
| 321 | + <Setter Target="HighContrastAdjustment" Value="None" /> |
| 322 | + </Style> |
| 323 | + </MenuFlyout.MenuFlyoutPresenterStyle> |
| 324 | + </MenuFlyout> |
| 325 | + </Button.ContextFlyout> |
| 326 | + </Button> |
| 327 | + </StackPanel> |
323 | 328 |
|
324 | 329 | <Button |
325 | 330 | x:Name="Up" |
|
691 | 696 | <Setter Target="StatusInfoBadge.Style" Value="{StaticResource CriticalIconInfoBadgeStyle}" /> |
692 | 697 | </VisualState.Setters> |
693 | 698 | </VisualState> |
| 699 | + <!-- FlowDirection LeftToRight --> |
| 700 | + <VisualState x:Name="LTR"> |
| 701 | + <VisualState.Setters> |
| 702 | + <Setter Target="NavigationButtons.Children[0]" Value="Back" /> |
| 703 | + <Setter Target="NavigationButtons.Children[1]" Value="Forward" /> |
| 704 | + </VisualState.Setters> |
| 705 | + </VisualState> |
| 706 | + <!-- FlowDirection RightToLeft --> |
| 707 | + <VisualState x:Name="RTL"> |
| 708 | + <VisualState.Setters> |
| 709 | + <Setter Target="NavigationButtons.Children[0]" Value="Forward" /> |
| 710 | + <Setter Target="NavigationButtons.Children[1]" Value="Back" /> |
| 711 | + </VisualState.Setters> |
| 712 | + </VisualState> |
694 | 713 | </VisualStateGroup> |
695 | 714 | </VisualStateManager.VisualStateGroups> |
696 | 715 | </Grid> |
|
0 commit comments