@@ -254,9 +254,6 @@ public SidebarViewModel()
254
254
HideSectionCommand = new RelayCommand ( HideSection ) ;
255
255
UnpinItemCommand = new RelayCommand ( UnpinItem ) ;
256
256
PinItemCommand = new RelayCommand ( PinItem ) ;
257
- OpenInNewTabCommand = new AsyncRelayCommand ( OpenInNewTabAsync ) ;
258
- OpenInNewWindowCommand = new AsyncRelayCommand ( OpenInNewWindowAsync ) ;
259
- OpenInNewPaneCommand = new AsyncRelayCommand ( OpenInNewPaneAsync ) ;
260
257
EjectDeviceCommand = new RelayCommand ( EjectDevice ) ;
261
258
OpenPropertiesCommand = new RelayCommand < CommandBarFlyout > ( OpenProperties ) ;
262
259
ReorderItemsCommand = new AsyncRelayCommand ( ReorderItemsAsync ) ;
@@ -830,41 +827,12 @@ public async void HandleItemInvokedAsync(object item, PointerUpdateKind pointerU
830
827
831
828
private ICommand UnpinItemCommand { get ; }
832
829
833
- private ICommand OpenInNewTabCommand { get ; }
834
-
835
- private ICommand OpenInNewWindowCommand { get ; }
836
-
837
- private ICommand OpenInNewPaneCommand { get ; }
838
-
839
830
private ICommand EjectDeviceCommand { get ; }
840
831
841
832
private ICommand OpenPropertiesCommand { get ; }
842
833
843
834
private ICommand ReorderItemsCommand { get ; }
844
835
845
- private async Task OpenInNewPaneAsync ( )
846
- {
847
- if ( await DriveHelpers . CheckEmptyDrive ( rightClickedItem . Path ) )
848
- return ;
849
- PaneHolder . OpenSecondaryPane ( rightClickedItem . Path ) ;
850
- }
851
-
852
- private async Task OpenInNewTabAsync ( )
853
- {
854
- if ( await DriveHelpers . CheckEmptyDrive ( rightClickedItem . Path ) )
855
- return ;
856
-
857
- await NavigationHelpers . OpenPathInNewTab ( rightClickedItem . Path , false ) ;
858
- }
859
-
860
- private async Task OpenInNewWindowAsync ( )
861
- {
862
- if ( await DriveHelpers . CheckEmptyDrive ( rightClickedItem . Path ) )
863
- return ;
864
-
865
- await NavigationHelpers . OpenPathInNewWindowAsync ( rightClickedItem . Path ) ;
866
- }
867
-
868
836
private void PinItem ( )
869
837
{
870
838
if ( rightClickedItem is DriveItem )
@@ -971,14 +939,14 @@ private List<ContextMenuFlyoutItemViewModel> GetLocationItemMenuItems(INavigatio
971
939
{
972
940
new ContextMenuFlyoutItemViewModel ( )
973
941
{
974
- Text = "SideBarCreateNewLibrary/Text" . GetLocalizedResource ( ) ,
942
+ Text = Strings . SideBarCreateNewLibrary_Text . GetLocalizedResource ( ) ,
975
943
Glyph = "\uE710 " ,
976
944
Command = CreateLibraryCommand ,
977
945
ShowItem = options . IsLibrariesHeader
978
946
} ,
979
947
new ContextMenuFlyoutItemViewModel ( )
980
948
{
981
- Text = "SideBarRestoreLibraries/Text" . GetLocalizedResource ( ) ,
949
+ Text = Strings . SideBarRestoreLibraries_Text . GetLocalizedResource ( ) ,
982
950
Glyph = "\uE10E " ,
983
951
Command = RestoreLibrariesCommand ,
984
952
ShowItem = options . IsLibrariesHeader
@@ -991,9 +959,18 @@ private List<ContextMenuFlyoutItemViewModel> GetLocationItemMenuItems(INavigatio
991
959
{
992
960
IsVisible = options . ShowEmptyRecycleBin ,
993
961
} . Build ( ) ,
994
- new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewTabFromSidebarAction ) . Build ( ) ,
995
- new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewWindowFromSidebarAction ) . Build ( ) ,
996
- new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewPaneFromSidebarAction ) . Build ( ) ,
962
+ new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewTabFromSidebarAction )
963
+ {
964
+ IsVisible = UserSettingsService . GeneralSettingsService . ShowOpenInNewTab
965
+ } . Build ( ) ,
966
+ new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewWindowFromSidebarAction )
967
+ {
968
+ IsVisible = UserSettingsService . GeneralSettingsService . ShowOpenInNewWindow
969
+ } . Build ( ) ,
970
+ new ContextMenuFlyoutItemViewModelBuilder ( Commands . OpenInNewPaneFromSidebarAction )
971
+ {
972
+ IsVisible = UserSettingsService . GeneralSettingsService . ShowOpenInNewPane
973
+ } . Build ( ) ,
997
974
new ContextMenuFlyoutItemViewModel ( )
998
975
{
999
976
Text = "PinFolderToSidebar" . GetLocalizedResource ( ) ,
0 commit comments