private void Timeline_KeyDown(object sender, KeyRoutedEventArgs e) { if (e.OriginalKey == Windows.System.VirtualKey.GamepadDPadLeft || e.OriginalKey == Windows.System.VirtualKey.GamepadLeftThumbstickLeft) { if (previousFocus != null) { previousFocus?.Focus(FocusState.Keyboard); } else { SectionList.Focus(FocusState.Keyboard); } e.Handled = true; } }
Control MainContent () { var splitter = new Splitter { Position = 200, FixedPanel = SplitterFixedPanel.Panel1 }; var sectionList = new SectionList (this.ContentContainer); // set focus when the form is shown this.Shown += delegate { sectionList.Focus (); }; splitter.Panel1 = sectionList; splitter.Panel2 = RightPane (); return splitter; }