@@ -56,6 +56,7 @@ private void Sidebar_ItemInvoked(Microsoft.UI.Xaml.Controls.NavigationView sende
56
56
{
57
57
//(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.HomeItems.isEnabled = false;
58
58
//(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.ShareItems.isEnabled = false;
59
+ string NaviagtionPath = "" ; // path to navigate
59
60
60
61
if ( args . InvokedItem == null )
61
62
{
@@ -78,45 +79,21 @@ private void Sidebar_ItemInvoked(Microsoft.UI.Xaml.Controls.NavigationView sende
78
79
}
79
80
else // Any other item
80
81
{
81
- if ( App . AppSettings . LayoutMode == 0 ) // List View
82
- {
83
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , args . InvokedItemContainer . Tag . ToString ( ) , new SuppressNavigationTransitionInfo ( ) ) ;
84
- }
85
- else
86
- {
87
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( PhotoAlbum ) , args . InvokedItemContainer . Tag . ToString ( ) , new SuppressNavigationTransitionInfo ( ) ) ;
88
- }
89
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.HomeItems.isEnabled = false;
90
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.ShareItems.isEnabled = false;
91
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
82
+ NaviagtionPath = args . InvokedItemContainer . Tag . ToString ( ) ;
92
83
}
93
84
94
85
break ;
95
86
}
96
87
case NavigationControlItemType . OneDrive :
97
88
{
98
- if ( App . AppSettings . LayoutMode == 0 ) // List View
99
- {
100
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . OneDrivePath , new SuppressNavigationTransitionInfo ( ) ) ;
101
- }
102
- else
103
- {
104
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( PhotoAlbum ) , App . AppSettings . OneDrivePath , new SuppressNavigationTransitionInfo ( ) ) ;
105
- }
89
+ NaviagtionPath = App . AppSettings . OneDrivePath ;
106
90
break ;
107
91
}
108
92
default :
109
93
{
110
94
var clickedItem = args . InvokedItemContainer ;
111
95
112
- if ( App . AppSettings . LayoutMode == 0 ) // List View
113
- {
114
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , clickedItem . Tag . ToString ( ) , new SuppressNavigationTransitionInfo ( ) ) ;
115
- }
116
- else
117
- {
118
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( PhotoAlbum ) , clickedItem . Tag . ToString ( ) , new SuppressNavigationTransitionInfo ( ) ) ;
119
- }
96
+ NaviagtionPath = clickedItem . Tag . ToString ( ) ;
120
97
121
98
App . CurrentInstance . NavigationToolbar . PathControlDisplayText = clickedItem . Tag . ToString ( ) ;
122
99
//(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
@@ -125,6 +102,15 @@ private void Sidebar_ItemInvoked(Microsoft.UI.Xaml.Controls.NavigationView sende
125
102
}
126
103
}
127
104
105
+ if ( App . AppSettings . LayoutMode == 0 ) // List View
106
+ {
107
+ App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , NaviagtionPath , new SuppressNavigationTransitionInfo ( ) ) ;
108
+ }
109
+ else
110
+ {
111
+ App . CurrentInstance . ContentFrame . Navigate ( typeof ( PhotoAlbum ) , NaviagtionPath , new SuppressNavigationTransitionInfo ( ) ) ;
112
+ }
113
+
128
114
App . CurrentInstance . NavigationToolbar . PathControlDisplayText = App . CurrentInstance . ViewModel . Universal . WorkingDirectory ;
129
115
}
130
116
0 commit comments