Skip to content

Commit

Permalink
Wpf: Focus the family text box when showing the FontDialog
Browse files Browse the repository at this point in the history
Also select all when the size or font family is focused so it is easier to find other fonts.
  • Loading branch information
cwensley committed Nov 27, 2024
1 parent 46dc8f1 commit 06ef6fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Eto.Wpf/CustomControls/FontDialog/fontchooser.xaml.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 06ef6fe

Please sign in to comment.