CPDFImageRotateUI.xaml.cs 940 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Windows;
  3. using System.Windows.Controls;
  4. namespace ComPDFKit.Controls.Edit
  5. {
  6. public partial class CPDFImageRotateUI : UserControl
  7. {
  8. #region
  9. public event EventHandler<double> RotationChanged;
  10. public CPDFImageRotateUI()
  11. {
  12. InitializeComponent();
  13. }
  14. public Orientation Orientation
  15. {
  16. get
  17. {
  18. return ImageRotateUI.Orientation;
  19. }
  20. set
  21. {
  22. ImageRotateUI.Orientation = value;
  23. }
  24. }
  25. #endregion
  26. #region
  27. private void RotateLeftBtn_Click(object sender, RoutedEventArgs e)
  28. {
  29. RotationChanged?.Invoke(this, 90);
  30. }
  31. private void RotateRightBtn_Click(object sender, RoutedEventArgs e)
  32. {
  33. RotationChanged?.Invoke(this, -90);
  34. }
  35. #endregion
  36. }
  37. }