private void UINavigationManager_Pressed(Views.UINavigationManager sender, Views.UINavigationButtons buttons) { if (buttons == Views.UINavigationButtons.Up || buttons == Views.UINavigationButtons.Down || buttons == Views.UINavigationButtons.Right || buttons == Views.UINavigationButtons.Left ) { var focused = FocusManager.GetFocusedElement(); Debug.WriteLine("現在のフォーカス:" + focused?.ToString()); } }
private async void UINavigationManager_Pressed(Views.UINavigationManager sender, Views.UINavigationButtons buttons) { await HohoemaApp.UIDispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { if (buttons == Views.UINavigationButtons.Up || buttons == Views.UINavigationButtons.Down || buttons == Views.UINavigationButtons.Right || buttons == Views.UINavigationButtons.Left ) { var focused = FocusManager.GetFocusedElement(); Debug.WriteLine("現在のフォーカス:" + focused?.ToString()); } }); }
private void UINavigationManager_Pressed(UINavigationManager sender, UINavigationButtons buttons) { var splitView = GetTemplateChild("ContentSplitView") as SplitView; if (_IsFocusing && buttons == UINavigationButtons.Left) { LeftInputCount++; if (LeftInputCount > 1) { splitView.IsPaneOpen = true; } } else { LeftInputCount = 0; if (buttons == UINavigationButtons.Accept || buttons == UINavigationButtons.Right) { splitView.IsPaneOpen = false; } } }
static UINavigationManager() { __Instance = new UINavigationManager(); }