AnnotToolContent.xaml.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using ComPDFKitViewer.PdfViewer;
  2. using PDF_Office.CustomControl;
  3. using PDF_Office.ViewModels.Tools;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows;
  10. using System.Windows.Controls;
  11. using System.Windows.Data;
  12. using System.Windows.Documents;
  13. using System.Windows.Input;
  14. using System.Windows.Media;
  15. using System.Windows.Media.Imaging;
  16. using System.Windows.Navigation;
  17. using System.Windows.Shapes;
  18. namespace PDF_Office.Views.Tools
  19. {
  20. /// <summary>
  21. /// AnnotToolContent.xaml 的交互逻辑
  22. /// </summary>
  23. public partial class AnnotToolContent : UserControl
  24. {
  25. public AnnotToolContent()
  26. {
  27. InitializeComponent();
  28. }
  29. private void BtnHand_Click(object sender, RoutedEventArgs e)
  30. {
  31. }
  32. private void BtnTool_Click(object sender, RoutedEventArgs e)
  33. {
  34. CustomIconToggleBtn keepBtn = sender as CustomIconToggleBtn;
  35. if (keepBtn != null)
  36. {
  37. ClearSelectedToolPanel(keepBtn);
  38. }
  39. }
  40. private void ClearSelectedToolPanel(CustomIconToggleBtn keepBtn = null)
  41. {
  42. foreach (var item in ToolPanel.Children)
  43. {
  44. CustomIconToggleBtn checkBtn = item as CustomIconToggleBtn;
  45. if (checkBtn != null && checkBtn != keepBtn)
  46. {
  47. checkBtn.IsChecked = false;
  48. }
  49. }
  50. }
  51. private void BtnBookMark_Click(object sender, RoutedEventArgs e)
  52. {
  53. }
  54. }
  55. }