From c380b001b73edb66a9176f1ec711e42ca54232f4 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Sat, 25 Jul 2020 11:35:27 -0700 Subject: [PATCH] Put focus on code list after opening project Setting the focus allows certain key commands (like up/down arrows) to work without having to click in the code list first. --- SourceGen/WpfGui/MainWindow.xaml.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SourceGen/WpfGui/MainWindow.xaml.cs b/SourceGen/WpfGui/MainWindow.xaml.cs index cd41913..ccadbe1 100644 --- a/SourceGen/WpfGui/MainWindow.xaml.cs +++ b/SourceGen/WpfGui/MainWindow.xaml.cs @@ -281,6 +281,10 @@ namespace SourceGen.WpfGui { mShowCodeListView = value; OnPropertyChanged("LaunchPanelVisibility"); OnPropertyChanged("CodeListVisibility"); + if (value) { + // Put the focus on the list view. Doesn't select anything. + codeListView.Focus(); + } } } private bool mShowCodeListView;