Pipe.xaml.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 Venus_Themes.UserControls
  16. {
  17. /// <summary>
  18. /// Pipe.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class Pipe : UserControl
  21. {
  22. public Pipe()
  23. {
  24. InitializeComponent();
  25. }
  26. public static readonly DependencyProperty IsFlowingProperty = DependencyProperty.Register(
  27. "IsFlowing", typeof(bool), typeof(Pipe),
  28. new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  29. public static readonly DependencyProperty IsReverseProperty = DependencyProperty.Register(
  30. "IsReverse", typeof(bool), typeof(Pipe),
  31. new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
  32. public bool IsFlowing
  33. {
  34. get { return (bool)this.GetValue(IsFlowingProperty); }
  35. set { this.SetValue(IsFlowingProperty, value); }
  36. }
  37. public bool IsReverse
  38. {
  39. get
  40. {
  41. return (bool)this.GetValue(IsReverseProperty);
  42. }
  43. set
  44. {
  45. this.SetValue(IsReverseProperty, value);
  46. }
  47. }
  48. public bool IsVertical { get; set; }
  49. protected override void OnRender(DrawingContext drawingContext)
  50. {
  51. base.OnRender(drawingContext);
  52. }
  53. }
  54. }