CPDFThicknessControl.xaml.cs 784 B

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