public void SetOverlayFrame(object content) { bool isEmpty = content == null; var focusMode = (isEmpty ? MainFrame_KeyboardNavigationMode_Default : KeyboardNavigationMode.None); KeyboardNavigation.SetTabNavigation(MainFrame, focusMode); Keyboard.ClearFocus(); OverlayFrame.Navigate(content); }
private void NowPanel_Click(object sender, RoutedEventArgs e) { if (Context.NowPlayingList.Count > 0 && Context.CurrentIndex >= 0) { OverlayFrame.Visibility = Visibility.Visible; MainFrame.Visibility = Visibility.Collapsed; ConnectedAnimationService.GetForCurrentView().PrepareToAnimate(Consts.NowPlayingPageInAnimation, Artwork); ConnectedAnimationService.GetForCurrentView().PrepareToAnimate($"{Consts.NowPlayingPageInAnimation}_1", Title); ConnectedAnimationService.GetForCurrentView().PrepareToAnimate($"{Consts.NowPlayingPageInAnimation}_2", Album).Completed += MainPage_Completed;; OverlayFrame.Navigate(typeof(NowPlayingPage), Context.NowPlayingList[Context.CurrentIndex]); } }
private void StackPanel_PointerReleased(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e) { if (Context.NowPlayingList.Count > 0 && Context.CurrentIndex >= 0) { OverlayFrame.Visibility = Visibility.Visible; MainFrame.Visibility = Visibility.Collapsed; ConnectedAnimationService.GetForCurrentView().PrepareToAnimate(Consts.NowPlayingPageInAnimation, Artwork); ConnectedAnimationService.GetForCurrentView().PrepareToAnimate($"{Consts.NowPlayingPageInAnimation}_1", Title); ConnectedAnimationService.GetForCurrentView().PrepareToAnimate($"{Consts.NowPlayingPageInAnimation}_2", Album).Completed += MainPage_Completed;; OverlayFrame.Navigate(typeof(NowPlayingPage), Context.NowPlayingList[Context.CurrentIndex]); } if (sender is Panel s) { (s.Resources["PointerOver"] as Storyboard).Begin(); e.Handled = true; } }
/// <summary> /// Clears the overlayframe /// </summary> public void ClearOverlayFrame() { //Goto a new null menu OverlayFrame.Navigate(new Page()); OverlayFrame.NavigationService.RemoveBackEntry(); }