Skip to content

Commit

Permalink
Merge pull request #2708 from cwensley/curtis/wpf-font-chooser-focus
Browse files Browse the repository at this point in the history
Wpf: Focus the family text box when showing the FontDialog
  • Loading branch information
cwensley authored Nov 27, 2024
2 parents f43a185 + 06ef6fe commit f9d38ce
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 f9d38ce

Please sign in to comment.