private void Timer_focus_Tick(object sender, object e) { var elent = FocusManager.GetFocusedElement(); if (elent is Button || elent is AppBarButton || elent is HyperlinkButton || elent is MenuFlyoutItem) { BtnFoucs.Focus(FocusState.Programmatic); } }
private void LiveDetailPage_Loaded(object sender, RoutedEventArgs e) { Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown; BtnFoucs.Focus(FocusState.Programmatic); DanmuControl.ClearAll(); if (this.Parent is MyFrame) { (this.Parent as MyFrame).ClosedPage -= LiveDetailPage_ClosedPage; (this.Parent as MyFrame).ClosedPage += LiveDetailPage_ClosedPage; } timer_focus.Start(); controlTimer.Start(); }