Redress.xaml.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using PDF_Master.CustomControl.ScanViewControl;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace PDF_Master.Views.Scan
  17. {
  18. /// <summary>
  19. /// Redress.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class Redress : UserControl
  22. {
  23. public Redress()
  24. {
  25. InitializeComponent();
  26. }
  27. public string TextBoxContext
  28. {
  29. get { return (string)GetValue(TextBoxContextProperty); }
  30. set
  31. {
  32. SetValue(TextBoxContextProperty, value);
  33. }
  34. }
  35. public CustomDraw HitChild { get; set; }
  36. // Using a DependencyProperty as the backing store for TextBoxContext. This enables animation, styling, binding, etc...
  37. public static readonly DependencyProperty TextBoxContextProperty =
  38. DependencyProperty.Register("TextBoxContext", typeof(string), typeof(Redress), new PropertyMetadata(""));
  39. private void BtnCancel_Click(object sender, RoutedEventArgs e)
  40. {
  41. Visibility = Visibility.Collapsed;
  42. }
  43. public void SelectAll()
  44. {
  45. TxtInput.SelectAll();
  46. TxtInput.Focus();
  47. }
  48. public event EventHandler ApplyCommandHandler;
  49. private void BtnApply_Click(object sender, RoutedEventArgs e)
  50. {
  51. ApplyCommandHandler.Invoke(sender, e);
  52. }
  53. }
  54. }