|
72 | 72 | Grid.Column="0" |
73 | 73 | HorizontalAlignment="Left" |
74 | 74 | x:Load="{x:Bind ViewModel.InstanceViewModel.IsPageTypeNotHome, Mode=OneWay}" |
75 | | - DefaultLabelPosition="Right"> |
| 75 | + DefaultLabelPosition="Right" |
| 76 | + IsDynamicOverflowEnabled="{x:Bind ViewModel.IsDynamicOverflowEnabled, Mode=OneWay}"> |
76 | 77 | <CommandBar.PrimaryCommands> |
77 | 78 |
|
78 | 79 | <!-- New Item --> |
|
287 | 288 | x:Name="ExtractButton" |
288 | 289 | Width="Auto" |
289 | 290 | MinWidth="40" |
290 | | - x:Load="{x:Bind ViewModel.CanExtract, Mode=OneWay, FallbackValue=False}" |
291 | 291 | AccessKey="Z" |
292 | 292 | AccessKeyInvoked="AppBarButton_AccessKeyInvoked" |
293 | 293 | IsEnabled="{x:Bind ViewModel.CanExtract, Mode=OneWay, FallbackValue=False}" |
294 | 294 | Label="{helpers:ResourceString Name=Extract}" |
295 | 295 | LabelPosition="Default" |
296 | | - Style="{StaticResource ToolBarAppBarButtonFlyoutStyle}"> |
| 296 | + Style="{StaticResource ToolBarAppBarButtonFlyoutStyle}" |
| 297 | + Visibility="{x:Bind ViewModel.CanExtract, Mode=OneWay}"> |
297 | 298 |
|
298 | 299 | <controls:ThemedIcon Style="{StaticResource App.ThemedIcons.Zip}" /> |
299 | 300 |
|
|
331 | 332 | x:Name="RunWithPowerShellButton" |
332 | 333 | Width="Auto" |
333 | 334 | MinWidth="40" |
334 | | - x:Load="{x:Bind Commands.RunWithPowershell.IsExecutable, Mode=OneWay}" |
335 | 335 | AutomationProperties.Name="RunWithPowerShell" |
336 | 336 | Command="{x:Bind Commands.RunWithPowershell}" |
337 | 337 | Label="{x:Bind Commands.RunWithPowershell.Label}" |
338 | 338 | LabelPosition="Default" |
339 | | - ToolTipService.ToolTip="{x:Bind Commands.RunWithPowershell.LabelWithHotKey, Mode=OneWay}"> |
| 339 | + ToolTipService.ToolTip="{x:Bind Commands.RunWithPowershell.LabelWithHotKey, Mode=OneWay}" |
| 340 | + Visibility="{x:Bind Commands.RunWithPowershell.IsExecutable, Mode=OneWay}"> |
340 | 341 | <AppBarButton.Icon> |
341 | 342 | <FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.RunWithPowershell.Glyph.BaseGlyph}" /> |
342 | 343 | </AppBarButton.Icon> |
|
347 | 348 | x:Name="EditInNotepadButton" |
348 | 349 | Width="Auto" |
349 | 350 | MinWidth="40" |
350 | | - x:Load="{x:Bind Commands.EditInNotepad.IsExecutable, Mode=OneWay}" |
351 | 351 | AutomationProperties.Name="EditInNotepad" |
352 | 352 | Command="{x:Bind Commands.EditInNotepad}" |
353 | 353 | Label="{x:Bind Commands.EditInNotepad.Label}" |
354 | 354 | LabelPosition="Default" |
355 | | - ToolTipService.ToolTip="{x:Bind Commands.EditInNotepad.LabelWithHotKey, Mode=OneWay}"> |
| 355 | + ToolTipService.ToolTip="{x:Bind Commands.EditInNotepad.LabelWithHotKey, Mode=OneWay}" |
| 356 | + Visibility="{x:Bind Commands.EditInNotepad.IsExecutable, Mode=OneWay}"> |
356 | 357 | <AppBarButton.Icon> |
357 | 358 | <FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.EditInNotepad.Glyph.BaseGlyph}" /> |
358 | 359 | </AppBarButton.Icon> |
|
363 | 364 | x:Name="SetAsBackgroundButton" |
364 | 365 | Width="Auto" |
365 | 366 | MinWidth="40" |
366 | | - x:Load="{x:Bind Commands.SetAsWallpaperBackground.IsExecutable, Mode=OneWay}" |
367 | 367 | Label="{helpers:ResourceString Name=SetAsBackgroundFlyout}" |
368 | 368 | LabelPosition="Default" |
369 | 369 | Style="{StaticResource ToolBarAppBarButtonFlyoutStyle}" |
370 | | - ToolTipService.ToolTip="{helpers:ResourceString Name=SetAsBackgroundFlyout}"> |
| 370 | + ToolTipService.ToolTip="{helpers:ResourceString Name=SetAsBackgroundFlyout}" |
| 371 | + Visibility="{x:Bind Commands.SetAsWallpaperBackground.IsExecutable, Mode=OneWay}"> |
371 | 372 |
|
372 | 373 | <controls:ThemedIcon Style="{StaticResource App.ThemedIcons.SetWallpaper.16}" /> |
373 | 374 |
|
|
410 | 411 | x:Name="SetAsSlideshowButton" |
411 | 412 | Width="Auto" |
412 | 413 | MinWidth="40" |
413 | | - x:Load="{x:Bind Commands.SetAsSlideshowBackground.IsExecutable, Mode=OneWay}" |
414 | 414 | Command="{x:Bind Commands.SetAsSlideshowBackground}" |
415 | 415 | Icon="{x:Bind Commands.SetAsSlideshowBackground.FontIcon}" |
416 | 416 | Label="{x:Bind Commands.SetAsSlideshowBackground.Label}" |
417 | 417 | LabelPosition="Default" |
418 | | - ToolTipService.ToolTip="{x:Bind Commands.SetAsSlideshowBackground.LabelWithHotKey, Mode=OneWay}" /> |
| 418 | + ToolTipService.ToolTip="{x:Bind Commands.SetAsSlideshowBackground.LabelWithHotKey, Mode=OneWay}" |
| 419 | + Visibility="{x:Bind Commands.SetAsSlideshowBackground.IsExecutable, Mode=OneWay}" /> |
419 | 420 |
|
420 | 421 | <!-- Install Inf --> |
421 | 422 | <AppBarButton |
422 | 423 | x:Name="InstallInfButton" |
423 | | - x:Load="{x:Bind Commands.InstallInfDriver.IsExecutable, Mode=OneWay, FallbackValue=False}" |
424 | 424 | Command="{x:Bind Commands.InstallInfDriver, Mode=OneWay}" |
425 | 425 | Label="{x:Bind Commands.InstallInfDriver.Label}" |
426 | 426 | LabelPosition="Default" |
427 | | - ToolTipService.ToolTip="{helpers:ResourceString Name=Install}"> |
| 427 | + ToolTipService.ToolTip="{helpers:ResourceString Name=Install}" |
| 428 | + Visibility="{x:Bind Commands.InstallInfDriver.IsExecutable, Mode=OneWay}"> |
428 | 429 | <AppBarButton.Icon> |
429 | 430 | <FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.InstallInfDriver.Glyph.BaseGlyph}" /> |
430 | 431 | </AppBarButton.Icon> |
|
433 | 434 | <!-- Rotate Image Left --> |
434 | 435 | <AppBarButton |
435 | 436 | x:Name="RotateImageLeftButton" |
436 | | - x:Load="{x:Bind ViewModel.IsImage, Mode=OneWay, FallbackValue=False}" |
437 | 437 | Command="{x:Bind Commands.RotateLeft, Mode=OneWay}" |
438 | 438 | Label="{x:Bind Commands.RotateLeft.Label}" |
439 | 439 | LabelPosition="Default" |
440 | | - ToolTipService.ToolTip="{helpers:ResourceString Name=RotateLeft}"> |
| 440 | + ToolTipService.ToolTip="{helpers:ResourceString Name=RotateLeft}" |
| 441 | + Visibility="{x:Bind Commands.RotateLeft.IsExecutable, Mode=OneWay}"> |
441 | 442 | <controls:ThemedIcon Style="{x:Bind Commands.RotateLeft.ThemedIconStyle}" /> |
442 | 443 | </AppBarButton> |
443 | 444 |
|
444 | 445 | <!-- Rotate Image Right --> |
445 | 446 | <AppBarButton |
446 | 447 | x:Name="RotateImageRightButton" |
447 | | - x:Load="{x:Bind ViewModel.IsImage, Mode=OneWay, FallbackValue=False}" |
448 | 448 | Command="{x:Bind Commands.RotateRight, Mode=OneWay}" |
449 | 449 | Label="{x:Bind Commands.RotateRight.Label}" |
450 | 450 | LabelPosition="Default" |
451 | | - ToolTipService.ToolTip="{helpers:ResourceString Name=RotateRight}"> |
| 451 | + ToolTipService.ToolTip="{helpers:ResourceString Name=RotateRight}" |
| 452 | + Visibility="{x:Bind Commands.RotateRight.IsExecutable, Mode=OneWay}"> |
452 | 453 | <controls:ThemedIcon Style="{x:Bind Commands.RotateRight.ThemedIconStyle}" /> |
453 | 454 | </AppBarButton> |
454 | 455 |
|
455 | 456 | <!-- Install Font --> |
456 | 457 | <AppBarButton |
457 | 458 | x:Name="InstallFontButton" |
458 | | - x:Load="{x:Bind Commands.InstallFont.IsExecutable, Mode=OneWay, FallbackValue=False}" |
459 | 459 | Command="{x:Bind Commands.InstallFont, Mode=OneWay}" |
460 | 460 | Label="{x:Bind Commands.InstallFont.Label}" |
461 | 461 | LabelPosition="Default" |
462 | | - ToolTipService.ToolTip="{helpers:ResourceString Name=Install}"> |
| 462 | + ToolTipService.ToolTip="{helpers:ResourceString Name=Install}" |
| 463 | + Visibility="{x:Bind Commands.InstallFont.IsExecutable, Mode=OneWay}"> |
463 | 464 | <controls:ThemedIcon Style="{x:Bind Commands.InstallFont.ThemedIconStyle}" /> |
464 | 465 | </AppBarButton> |
465 | 466 |
|
466 | 467 | <!-- Install Certificate --> |
467 | 468 | <AppBarButton |
468 | 469 | x:Name="InstallCertificateButton" |
469 | | - x:Load="{x:Bind Commands.InstallCertificate.IsExecutable, Mode=OneWay, FallbackValue=False}" |
470 | 470 | Command="{x:Bind Commands.InstallCertificate, Mode=OneWay}" |
471 | 471 | Label="{x:Bind Commands.InstallCertificate.Label}" |
472 | 472 | LabelPosition="Default" |
473 | | - ToolTipService.ToolTip="{helpers:ResourceString Name=Install}"> |
| 473 | + ToolTipService.ToolTip="{helpers:ResourceString Name=Install}" |
| 474 | + Visibility="{x:Bind Commands.InstallCertificate.IsExecutable, Mode=OneWay}"> |
474 | 475 | <AppBarButton.Icon> |
475 | 476 | <FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.InstallCertificate.Glyph.BaseGlyph, Mode=OneTime}" /> |
476 | 477 | </AppBarButton.Icon> |
|
479 | 480 | <!-- Play All Media --> |
480 | 481 | <AppBarButton |
481 | 482 | x:Name="PlayAllMediaButton" |
482 | | - x:Load="{x:Bind Commands.PlayAll.IsExecutable, Mode=OneWay, FallbackValue=False}" |
483 | 483 | Command="{x:Bind Commands.PlayAll, Mode=OneWay}" |
484 | 484 | KeyboardAcceleratorTextOverride="{x:Bind Commands.PlayAll.HotKeyText, Mode=OneWay}" |
485 | 485 | Label="{x:Bind Commands.PlayAll.Label}" |
486 | 486 | LabelPosition="Default" |
487 | | - ToolTipService.ToolTip="{x:Bind Commands.PlayAll.LabelWithHotKey, Mode=OneWay}"> |
| 487 | + ToolTipService.ToolTip="{x:Bind Commands.PlayAll.LabelWithHotKey, Mode=OneWay}" |
| 488 | + Visibility="{x:Bind Commands.PlayAll.IsExecutable, Mode=OneWay}"> |
488 | 489 | <AppBarButton.Icon> |
489 | 490 | <FontIcon Foreground="{ThemeResource App.Theme.IconBaseBrush}" Glyph="{x:Bind Commands.PlayAll.Glyph.BaseGlyph}" /> |
490 | 491 | </AppBarButton.Icon> |
|
0 commit comments