ComboBoxKeyboard.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. namespace GDNXFD.Alert.Config.Controls
  2. {
  3. using GDNXFD.Alert.Config.Helpers;
  4. using System;
  5. using System.Threading;
  6. using System.Threading.Tasks;
  7. using System.Windows.Controls;
  8. /// <summary>
  9. /// Combobox with virtual Keyboard
  10. /// </summary>.
  11. public class ComboBoxKeyboard : ComboBox
  12. {
  13. private TabtipHelper tabtipHelper = TabtipHelper.Instance;
  14. /// <summary>
  15. /// On got focus.
  16. /// </summary>
  17. /// <param name="e">Event args</param>
  18. protected override void OnGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)
  19. {
  20. tabtipHelper.TryCreateTabtipProcess();
  21. base.OnGotKeyboardFocus(e);
  22. }
  23. /// <summary>
  24. /// On lost focus.
  25. /// </summary>
  26. /// <param name="e">Event args</param>
  27. protected override void OnLostKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)
  28. {
  29. tabtipHelper.TryKillTabtipProcess();
  30. base.OnLostKeyboardFocus(e);
  31. }
  32. }
  33. }