@@ -157,6 +157,8 @@ public IShellPage? ActivePane
157157 NotifyPropertyChanged ( nameof ( IsRightPaneActive ) ) ;
158158 NotifyPropertyChanged ( nameof ( ActivePaneOrColumn ) ) ;
159159 NotifyPropertyChanged ( nameof ( FilesystemHelpers ) ) ;
160+
161+ SetShadow ( ) ;
160162 }
161163 }
162164 }
@@ -243,9 +245,21 @@ public void CloseActivePane()
243245 {
244246 // NOTE: Can only close right pane at the moment
245247 IsRightPaneVisible = false ;
248+
249+ PaneLeft . Focus ( FocusState . Programmatic ) ;
250+ SetShadow ( ) ;
251+ }
252+
253+ public void FocusLeftPane ( )
254+ {
246255 PaneLeft . Focus ( FocusState . Programmatic ) ;
247256 }
248257
258+ public void FocusRightPane ( )
259+ {
260+ PaneRight . Focus ( FocusState . Programmatic ) ;
261+ }
262+
249263 // Override methods
250264
251265 protected override void OnNavigatedTo ( NavigationEventArgs eventArgs )
@@ -305,30 +319,6 @@ private void MainWindow_SizeChanged(object sender, WindowSizeChangedEventArgs e)
305319 WindowIsCompact = MainWindow . Instance . Bounds . Width <= Constants . UI . MultiplePaneWidthThreshold ;
306320 }
307321
308- private void KeyboardAccelerator_Invoked ( KeyboardAccelerator sender , KeyboardAcceleratorInvokedEventArgs args )
309- {
310- args . Handled = true ;
311- var ctrl = args . KeyboardAccelerator . Modifiers . HasFlag ( VirtualKeyModifiers . Control ) ;
312- var shift = args . KeyboardAccelerator . Modifiers . HasFlag ( VirtualKeyModifiers . Shift ) ;
313- var menu = args . KeyboardAccelerator . Modifiers . HasFlag ( VirtualKeyModifiers . Menu ) ;
314-
315- switch ( c : ctrl , s : shift , m : menu , k : args . KeyboardAccelerator . Key )
316- {
317- case ( true , true , false , VirtualKey . Left ) : // ctrl + shift + "<-" select left pane
318- ActivePane = PaneLeft ;
319- break ;
320-
321- case ( true , true , false , VirtualKey . Right ) : // ctrl + shift + "->" select right pane
322- if ( string . IsNullOrEmpty ( NavParamsRight ? . NavPath ) )
323- {
324- NavParamsRight = new NavigationParams { NavPath = "Home" } ;
325- }
326- IsRightPaneVisible = true ;
327- ActivePane = PaneRight ;
328- break ;
329- }
330- }
331-
332322 private void Pane_ContentChanged ( object sender , TabBarItemParameter e )
333323 {
334324 TabBarItemParameter = new ( )
@@ -346,8 +336,6 @@ private void Pane_Loaded(object sender, RoutedEventArgs e)
346336 {
347337 ( ( UIElement ) sender ) . GotFocus += Pane_GotFocus ;
348338 ( ( UIElement ) sender ) . RightTapped += Pane_RightTapped ;
349-
350- PaneLeft . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 8 ) ;
351339 }
352340
353341 private void Pane_GotFocus ( object sender , RoutedEventArgs e )
@@ -369,22 +357,30 @@ private void Pane_GotFocus(object sender, RoutedEventArgs e)
369357 var activePane = isLeftPane ? PaneLeft : PaneRight ;
370358 if ( ActivePane != activePane )
371359 ActivePane = activePane ;
360+ }
372361
373- // Add theme shadow to the active pane
374- if ( isLeftPane )
362+ private void SetShadow ( )
363+ {
364+ if ( IsMultiPaneActive )
375365 {
376- if ( PaneRight is not null )
377- PaneRight . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 0 ) ;
378- if ( PaneLeft is not null )
379- PaneLeft . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 8 ) ;
366+ // Add theme shadow to the active pane
367+ if ( IsLeftPaneActive )
368+ {
369+ if ( PaneRight is not null )
370+ PaneRight . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 0 ) ;
371+ if ( PaneLeft is not null )
372+ PaneLeft . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 32 ) ;
373+ }
374+ else
375+ {
376+ if ( PaneRight is not null )
377+ PaneRight . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 32 ) ;
378+ if ( PaneLeft is not null )
379+ PaneLeft . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 0 ) ;
380+ }
380381 }
381382 else
382- {
383- if ( PaneRight is not null )
384- PaneRight . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 8 ) ;
385- if ( PaneLeft is not null )
386- PaneLeft . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 0 ) ;
387- }
383+ PaneLeft . RootGrid . Translation = new System . Numerics . Vector3 ( 0 , 0 , 8 ) ;
388384 }
389385
390386 private void Pane_RightTapped ( object sender , RoutedEventArgs e )
0 commit comments