From 06ef6fe594ee33128ff683e3f73d2d2fb3df1aeb Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Wed, 27 Nov 2024 08:39:55 -0800 Subject: [PATCH] Wpf: Focus the family text box when showing the FontDialog Also select all when the size or font family is focused so it is easier to find other fonts. --- src/Eto.Wpf/CustomControls/FontDialog/fontchooser.xaml.cs | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 src/Eto.Wpf/CustomControls/FontDialog/fontchooser.xaml.cs diff --git a/src/Eto.Wpf/CustomControls/FontDialog/fontchooser.xaml.cs b/src/Eto.Wpf/CustomControls/FontDialog/fontchooser.xaml.cs old mode 100644 new mode 100755 index 450c7dab33..7e3942f31c --- a/src/Eto.Wpf/CustomControls/FontDialog/fontchooser.xaml.cs +++ b/src/Eto.Wpf/CustomControls/FontDialog/fontchooser.xaml.cs @@ -226,6 +226,12 @@ void FontChooser_Loaded (object sender, RoutedEventArgs e) // Schedule background updates. _populated = true; ScheduleUpdate (); + + // Make using the keyboard easier by setting focus initially and selecting all + sizeTextBox.GotFocus += (sender, e) => sizeTextBox.SelectAll(); + fontFamilyTextBox.GotFocus += (sender, e) => fontFamilyTextBox.SelectAll(); + + fontFamilyTextBox.Focus(); } #endregion