CPDFImageRotateUI.xaml.cs 861 B

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