CPDFOpacityControl.xaml.cs 758 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Windows.Controls;
  3. namespace Compdfkit_Tools.Common
  4. {
  5. public partial class CPDFOpacityControl : UserControl
  6. {
  7. public event EventHandler OpacityChanged;
  8. public int OpacityValue
  9. {
  10. get=> CPDFOpacityUI.OpacityValue;
  11. set => CPDFOpacityUI.OpacityValue = value;
  12. }
  13. public CPDFOpacityControl()
  14. {
  15. InitializeComponent();
  16. CPDFOpacityUI.OpacityChanged -= CPDFOpacityUI_OpacityChanged;
  17. CPDFOpacityUI.OpacityChanged += CPDFOpacityUI_OpacityChanged;
  18. }
  19. private void CPDFOpacityUI_OpacityChanged(object sender, EventArgs e)
  20. {
  21. OpacityChanged?.Invoke(this, EventArgs.Empty);
  22. }
  23. }
  24. }