private void HideTransportGrid() { transportGridAnimating = true; Storyboard storyboard = ((Storyboard)TransportControlGrid.Resources["ExitStoryboard"]); EventHandler <object> handler = null; handler = new EventHandler <object>((x, y) => { storyboard.Completed -= handler; transportGridAnimating = false; transportGridVisible = false; TransportControlGrid.IsHitTestVisible = false; //TransportControlGrid.Visibility = Visibility.Collapsed; InlineFrame.IsEnabled = true; InlineFrame.Focus(FocusState.Programmatic); ElementSoundPlayer.Play(ElementSoundKind.Hide); if (InlineFrame.Content is IXboxInputPage) { ((IXboxInputPage)InlineFrame.Content).RestoreFocus(); } }); storyboard.Completed += handler; storyboard.Begin(); }
private void RestoreFocusToInlineFramePage() { InlineFrame.Focus(FocusState.Programmatic); if (InlineFrame.Content is IXboxInputPage) { ((IXboxInputPage)InlineFrame.Content).RestoreFocus(); } }