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