TextAnnotProperty.xaml.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using ComPDFKitViewer;
  2. using ComPDFKitViewer.AnnotEvent;
  3. using PDF_Master.Properties;
  4. using PDF_Master.ViewModels.PropertyPanel.AnnotPanel;
  5. using PDFSettings;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Windows;
  12. using System.Windows.Controls;
  13. using System.Windows.Data;
  14. using System.Windows.Documents;
  15. using System.Windows.Input;
  16. using System.Windows.Media;
  17. using System.Windows.Media.Imaging;
  18. using System.Windows.Navigation;
  19. using System.Windows.Shapes;
  20. namespace PDF_Master.Views.PropertyPanel.AnnotPanel
  21. {
  22. /// <summary>
  23. /// TextAnnotProperty.xaml 的交互逻辑
  24. /// </summary>
  25. public partial class TextAnnotProperty : UserControl
  26. {
  27. private TextAnnotPropertyViewModel ViewModel => DataContext as TextAnnotPropertyViewModel;
  28. public TextAnnotProperty()
  29. {
  30. InitializeComponent();
  31. cusColor.SelectedColorHandler += cusColor_SelectedColor;
  32. }
  33. private void cusColor_SelectedColor(object sender, Color e)
  34. {
  35. if (ViewModel != null)
  36. {
  37. ViewModel.SelectedColorChangedCommand?.Execute(e);
  38. }
  39. }
  40. private void cusColor_DefaultColorInvoke(object sender, RoutedEventArgs e)
  41. {
  42. ViewModel.DefaultColorChangedCommand?.Execute(sender);
  43. }
  44. }
  45. }