CustomCreateDialog.xaml.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using PDF_Master.Helper;
  2. using PDF_Master.ViewModels.PropertyPanel.AnnotPanel;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. namespace PDF_Master.Views.PropertyPanel.AnnotPanel
  18. {
  19. /// <summary>
  20. /// CustomCreateDialog.xaml 的交互逻辑
  21. /// </summary>
  22. public partial class CustomCreateDialog : UserControl
  23. {
  24. public CustomCreateDialog()
  25. {
  26. InitializeComponent();
  27. }
  28. private void RadioButton_Checked(object sender, RoutedEventArgs e)
  29. {
  30. (DataContext as CustomCreateDialogViewModel).SetStampStyle(Convert.ToInt32((sender as RadioButton).Tag));
  31. }
  32. private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
  33. {
  34. (DataContext as CustomCreateDialogViewModel).StampText = (e.OriginalSource as TextBox).Text;
  35. (DataContext as CustomCreateDialogViewModel).UpDataStamp();
  36. }
  37. private void UserControl_Loaded(object sender, RoutedEventArgs e)
  38. {
  39. InPutTextBox.Focus();
  40. InPutTextBox.SelectAll();
  41. }
  42. }
  43. }