@@ -61,11 +61,10 @@ public GenericFileBrowser()
6161 CopyItem . Click += Interaction . CopyItem_ClickAsync ;
6262 AllView . RightTapped += Interaction . AllView_RightTapped ;
6363 AllView . DoubleTapped += Interaction . List_ItemClick ;
64- // Clipboard.ContentChanged += Clipboard_ContentChanged;
64+ Clipboard . ContentChanged += Clipboard_ContentChanged ;
6565 //AddItemBox = AddDialog;
6666 //NameBox = NameDialog;
6767 //inputFromRename = RenameInput;
68- emptySpaceContext = EmptySpaceFlyout ;
6968 RefreshEmptySpace . Click += NavigationActions . Refresh_Click ;
7069 PasteEmptySpace . Click += Interaction . PasteItem_ClickAsync ;
7170 //CopiedFlyout = CopiedPathFlyout;
@@ -107,126 +106,52 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
107106 base . OnNavigatedTo ( eventArgs ) ;
108107 ProHome . BackButton . IsEnabled = ProHome . accessibleContentFrame . CanGoBack ;
109108 ProHome . ForwardButton . IsEnabled = ProHome . accessibleContentFrame . CanGoForward ;
109+ ProHome . RS . isEnabled = true ;
110+ App . AlwaysPresentCommands . isEnabled = true ;
110111 var parameters = ( string ) eventArgs . Parameter ;
111112 App . ViewModel . CancelLoadAndClearFiles ( ) ;
112113 App . ViewModel . Universal . path = parameters ;
113- //ProHome.BackButton.Click += NavigationActions.Back_Click;
114- //ProHome.ForwardButton.Click += NavigationActions.Forward_Click;
115114 ProHome . RefreshButton . Click += NavigationActions . Refresh_Click ;
116115 ProHome . AddItemButton . Click += AddItem_Click ;
117116 App . ViewModel . AddItemsToCollectionAsync ( App . ViewModel . Universal . path , GenericItemView ) ;
117+ Interaction . page = this ;
118118 if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . DesktopDirectory ) ) )
119119 {
120120 App . PathText . Text = "Desktop" ;
121- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
122- //{
123- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DesktopIC")
124- // {
125- // MainPage.Select.itemSelected = NavItemChoice;
126- // break;
127- // }
128- //}
129121 }
130122 else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . MyDocuments ) ) )
131123 {
132124 App . PathText . Text = "Documents" ;
133- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
134- //{
135- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DocumentsIC")
136- // {
137- // MainPage.Select.itemSelected = NavItemChoice;
138- // break;
139- // }
140- //}
141125 }
142126 else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) + @"\Downloads" ) )
143127 {
144128 App . PathText . Text = "Downloads" ;
145- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
146- //{
147- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DownloadsIC")
148- // {
149- // MainPage.Select.itemSelected = NavItemChoice;
150- // break;
151- // }
152- //}
153129 }
154130 else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . MyPictures ) ) )
155131 {
156132 App . PathText . Text = "Pictures" ;
157- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
158- //{
159- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "PicturesIC")
160- // {
161- // MainPage.Select.itemSelected = NavItemChoice;
162- // break;
163- // }
164- //}
165133 }
166134 else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . MyMusic ) ) )
167135 {
168136 App . PathText . Text = "Music" ;
169- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
170- //{
171- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "MusicIC")
172- // {
173- // MainPage.Select.itemSelected = NavItemChoice;
174- // break;
175- // }
176- //}
177137 }
178138 else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) + @"\OneDrive" ) )
179139 {
180140 App . PathText . Text = "OneDrive" ;
181- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
182- //{
183- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "OneD_IC")
184- // {
185- // MainPage.Select.itemSelected = NavItemChoice;
186- // break;
187- // }
188- //}
189141 }
190142 else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . MyVideos ) ) )
191143 {
192144 App . PathText . Text = "Videos" ;
193- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
194- //{
195- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "VideosIC")
196- // {
197- // MainPage.Select.itemSelected = NavItemChoice;
198- // break;
199- // }
200- //}
201145 }
202146 else
203147 {
204- //App.ViewModel.Universal.path = parameters;
205148 App . PathText . Text = parameters ;
206- if ( parameters . Contains ( "C:\\ " ) || parameters . Contains ( "c:\\ " ) )
207- {
208- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
209- //{
210- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Tag.ToString() == "LDPage")
211- // {
212- // MainPage.Select.itemSelected = NavItemChoice;
213- // break;
214- // }
215- //}
216- }
217- else
218- {
219- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
220- //{
221- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Tag.ToString().Contains(parameters.Split("\\")[0]))
222- // {
223- // MainPage.Select.itemSelected = NavItemChoice;
224- // break;
225- // }
226- //}
227- }
228149 }
229150
151+ if ( Interaction . dataGridRows != null )
152+ {
153+
154+ }
230155 }
231156
232157
@@ -301,12 +226,12 @@ private void ContentDialog_Loaded(object sender, RoutedEventArgs e)
301226
302227 private void GenericItemView_PointerReleased ( object sender , Windows . UI . Xaml . Input . PointerRoutedEventArgs e )
303228 {
304- data . SelectedItems . Clear ( ) ;
229+ data . SelectedItem = null ;
305230 }
306231
307232 private void AllView_SelectionChanged ( object sender , SelectionChangedEventArgs e )
308233 {
309-
234+
310235 AllView . CommitEdit ( ) ;
311236 if ( e . AddedItems . Count > 0 )
312237 {
@@ -331,22 +256,6 @@ private void NameDialog_SecondaryButtonClick(ContentDialog sender, ContentDialog
331256
332257 }
333258
334- private async void VisiblePath_TextChanged ( object sender , KeyRoutedEventArgs e )
335- {
336-
337-
338- }
339-
340- private void GenericItemView_RightTapped ( object sender , RightTappedRoutedEventArgs e )
341- {
342- GFBPageName . ContextFlyout . ShowAt ( GFBPageName ) ;
343- }
344-
345- private void AllView_ContextRequested ( UIElement sender , ContextRequestedEventArgs args )
346- {
347-
348- }
349-
350259 private void AllView_DragStarting ( UIElement sender , DragStartingEventArgs args )
351260 {
352261 args . DragUI . SetContentFromDataPackage ( ) ;
0 commit comments