public void OnAnimationEnd(Animator animation) { Animating = false; InputViewChecker.BringToFront( ); // based on the position, set the springboard flag if (View.GetX( ) == 0) { SpringboardRevealed = false; NavToolbar.Suspend(false); ToggleInputViewChecker(false); } else { SpringboardRevealed = true; NavToolbar.Suspend(true); if (MainActivity.IsLandscapeWide( ) == false) { ToggleInputViewChecker(true); } } // notify the task regarding what happened ActiveTask.SpringboardDidAnimate(SpringboardRevealed); }
private async void FileList_PreviewKeyDown(object sender, KeyRoutedEventArgs e) { var ctrlPressed = Window.Current.CoreWindow.GetKeyState(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down); var shiftPressed = Window.Current.CoreWindow.GetKeyState(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down); var focusedElement = FocusManager.GetFocusedElement() as FrameworkElement; var isFooterFocused = focusedElement is HyperlinkButton; if (e.Key == VirtualKey.Enter && !isFooterFocused && !e.KeyStatus.IsMenuKeyDown) { if (!IsRenamingItem) { NavigationHelpers.OpenSelectedItems(ParentShellPageInstance, false); e.Handled = true; } } else if (e.Key == VirtualKey.Enter && e.KeyStatus.IsMenuKeyDown) { FilePropertiesHelpers.ShowProperties(ParentShellPageInstance); e.Handled = true; } else if (e.Key == VirtualKey.Space) { if (!IsRenamingItem && !isFooterFocused && !ParentShellPageInstance.NavToolbarViewModel.IsEditModeEnabled) { e.Handled = true; await QuickLookHelpers.ToggleQuickLook(ParentShellPageInstance); } } else if (e.KeyStatus.IsMenuKeyDown && (e.Key == VirtualKey.Left || e.Key == VirtualKey.Right || e.Key == VirtualKey.Up)) { // Unfocus the GridView so keyboard shortcut can be handled NavToolbar?.Focus(FocusState.Pointer); } else if (e.KeyStatus.IsMenuKeyDown && shiftPressed && e.Key == VirtualKey.Add) { // Unfocus the ListView so keyboard shortcut can be handled (alt + shift + "+") NavToolbar?.Focus(FocusState.Pointer); } else if (e.Key == VirtualKey.Up || e.Key == VirtualKey.Down) { // If list has only one item, select it on arrow down/up (#5681) if (!IsItemSelected) { FileList.SelectedIndex = 0; e.Handled = true; } } }
private void FileList_PreviewKeyDown(object sender, KeyRoutedEventArgs e) { var ctrlPressed = Window.Current.CoreWindow.GetKeyState(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down); var shiftPressed = Window.Current.CoreWindow.GetKeyState(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down); if (e.Key == VirtualKey.Enter && !e.KeyStatus.IsMenuKeyDown) { if (!IsRenamingItem) { NavigationHelpers.OpenSelectedItems(ParentShellPageInstance, false); e.Handled = true; } } else if (e.Key == VirtualKey.Enter && e.KeyStatus.IsMenuKeyDown) { FilePropertiesHelpers.ShowProperties(ParentShellPageInstance); e.Handled = true; } else if (e.Key == VirtualKey.Space) { if (!IsRenamingItem && !ParentShellPageInstance.NavToolbarViewModel.IsEditModeEnabled) { if (App.MainViewModel.IsQuickLookEnabled) { QuickLookHelpers.ToggleQuickLook(ParentShellPageInstance); } e.Handled = true; } } else if (e.KeyStatus.IsMenuKeyDown && (e.Key == VirtualKey.Left || e.Key == VirtualKey.Right || e.Key == VirtualKey.Up)) { // Unfocus the GridView so keyboard shortcut can be handled NavToolbar?.Focus(FocusState.Pointer); } else if (ctrlPressed && shiftPressed && (e.Key == VirtualKey.Left || e.Key == VirtualKey.Right || e.Key == VirtualKey.W)) { // Unfocus the ListView so keyboard shortcut can be handled (ctrl + shift + W/"->"/"<-") NavToolbar?.Focus(FocusState.Pointer); } else if (e.KeyStatus.IsMenuKeyDown && shiftPressed && e.Key == VirtualKey.Add) { // Unfocus the ListView so keyboard shortcut can be handled (alt + shift + "+") NavToolbar?.Focus(FocusState.Pointer); } }