CPDFOpacityControl.xaml.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace Compdfkit_Tools.Common
  16. {
  17. /// <summary>
  18. /// CPDFOpacityControl.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class CPDFOpacityControl : UserControl
  21. {
  22. public event EventHandler OpacityChanged;
  23. /// <summary>
  24. /// Opacity重名会引起问题
  25. /// </summary>
  26. public int OpacityValue
  27. {
  28. get=> CPDFOpacityUI.OpacityValue;
  29. set => CPDFOpacityUI.OpacityValue = value;
  30. }
  31. public CPDFOpacityControl()
  32. {
  33. InitializeComponent();
  34. CPDFOpacityUI.OpacityChanged += CPDFOpacityUI_OpacityChanged;
  35. }
  36. private void CPDFOpacityUI_OpacityChanged(object sender, EventArgs e)
  37. {
  38. OpacityChanged?.Invoke(this, EventArgs.Empty);
  39. }
  40. }
  41. }