File tree Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -457,14 +457,17 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
457
457
new ContextMenuFlyoutItemViewModelBuilder ( Commands . CutItem )
458
458
{
459
459
IsPrimary = true ,
460
+ AccessKey = "X"
460
461
} . Build ( ) ,
461
462
new ContextMenuFlyoutItemViewModelBuilder ( Commands . CopyItem )
462
463
{
463
464
IsPrimary = true ,
465
+ AccessKey = "C"
464
466
} . Build ( ) ,
465
467
new ContextMenuFlyoutItemViewModelBuilder ( Commands . PasteItemToSelection )
466
468
{
467
469
IsPrimary = true ,
470
+ AccessKey = "V" ,
468
471
IsVisible = true ,
469
472
} . Build ( ) ,
470
473
new ContextMenuFlyoutItemViewModelBuilder ( Commands . PasteItemAsShortcut ) . Build ( ) ,
@@ -493,11 +496,13 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
493
496
new ContextMenuFlyoutItemViewModelBuilder ( Commands . Rename )
494
497
{
495
498
IsPrimary = true ,
499
+ AccessKey = "M" ,
496
500
IsVisible = itemsSelected
497
501
} . Build ( ) ,
498
502
new ContextMenuFlyoutItemViewModelBuilder ( Commands . ShareItem )
499
503
{
500
- IsPrimary = true
504
+ IsPrimary = true ,
505
+ AccessKey = "H"
501
506
} . Build ( ) ,
502
507
new ContextMenuFlyoutItemViewModelBuilder ( ModifiableCommands . DeleteItem )
503
508
{
@@ -507,6 +512,7 @@ public static List<ContextMenuFlyoutItemViewModel> GetBaseItemMenuItems(
507
512
new ContextMenuFlyoutItemViewModelBuilder ( ModifiableCommands . OpenProperties )
508
513
{
509
514
IsPrimary = true ,
515
+ AccessKey = "O" ,
510
516
IsVisible = ModifiableCommands . OpenProperties . IsExecutable
511
517
} . Build ( ) ,
512
518
new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenParentFolder ) . Build ( ) ,
Original file line number Diff line number Diff line change @@ -62,5 +62,7 @@ public sealed class ContextMenuFlyoutItemViewModel
62
62
public bool ShowLoadingIndicator { get ; set ; }
63
63
64
64
public bool IsHidden { get ; set ; }
65
+
66
+ public string AccessKey { get ; set ; }
65
67
}
66
68
}
Original file line number Diff line number Diff line change @@ -23,8 +23,11 @@ public bool IsVisible
23
23
}
24
24
25
25
public bool IsPrimary { get ; init ; } = false ;
26
+
26
27
public bool IsToggle { get ; init ; } = false ;
27
28
29
+ public string AccessKey { get ; init ; }
30
+
28
31
public object Tag { get ; init ; }
29
32
30
33
public bool ShowOnShift { get ; init ; } = false ;
@@ -64,6 +67,7 @@ public ContextMenuFlyoutItemViewModel Build()
64
67
ShowInSearchPage = true ,
65
68
ShowInFtpPage = true ,
66
69
ShowInZipPage = true ,
70
+ AccessKey = AccessKey ,
67
71
} ;
68
72
69
73
var glyph = command . Glyph ;
Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ private static ICommandBarElement GetCommandBarButton(ContextMenuFlyoutItemViewM
251
251
LabelPosition = item . IsPrimary || item . CollapseLabel ? CommandBarLabelPosition . Collapsed : CommandBarLabelPosition . Default ,
252
252
IsEnabled = item . IsEnabled ,
253
253
Visibility = item . IsHidden ? Visibility . Collapsed : Visibility . Visible ,
254
+ AccessKey = item . AccessKey ,
254
255
} ;
255
256
256
257
if ( element is AppBarToggleButton toggleButton )
@@ -281,6 +282,7 @@ private static ICommandBarElement GetCommandBarButton(ContextMenuFlyoutItemViewM
281
282
Content = content ,
282
283
IsEnabled = item . IsEnabled ,
283
284
Visibility = item . IsHidden ? Visibility . Collapsed : Visibility . Visible ,
285
+ AccessKey = item . AccessKey ,
284
286
} ;
285
287
286
288
if ( element is AppBarButton button )
You can’t perform that action at this time.
0 commit comments