using System.Windows; using System.Windows.Controls; namespace PLCSharp.Core.UserControls.ROI { /// /// RotateRectROI.xaml 的交互逻辑 /// public partial class RotateRectROI : UserControl { /// /// 旋转矩形ROI /// public RotateRectROI() { InitializeComponent(); } /// /// 圆心 Y /// public double CenterY { get { return (double)GetValue(CenterYProperty); } set { SetValue(CenterYProperty, value); } } // Using a DependencyProperty as the backing store for Top. This enables animation, styling, binding, etc... /// /// 中心YProperty /// public static readonly DependencyProperty CenterYProperty = DependencyProperty.Register("CenterY", typeof(double), typeof(RotateRectROI), new PropertyMetadata(50d)); /// /// 圆心 X /// public double CenterX { get { return (double)GetValue(CenterXProperty); } set { SetValue(CenterXProperty, value); } } /// /// 中心XProperty /// public static readonly DependencyProperty CenterXProperty = DependencyProperty.Register("CenterX", typeof(double), typeof(RotateRectROI), new PropertyMetadata(50d)); /// /// 矩形宽度 /// public double RectWidth { get { return (double)GetValue(RectWidthProperty); } set { SetValue(RectWidthProperty, value); } } // Using a DependencyProperty as the backing store for RRWidth. This enables animation, styling, binding, etc... /// /// 矩形宽度Property /// public static readonly DependencyProperty RectWidthProperty = DependencyProperty.Register("RectWidth", typeof(double), typeof(RotateRectROI), new PropertyMetadata(100d)); /// /// 矩形高度 /// public double RectHeight { get { return (double)GetValue(RectHeightProperty); } set { SetValue(RectHeightProperty, value); } } // Using a DependencyProperty as the backing store for RRHeig. This enables animation, styling, binding, etc... /// /// 矩形高度Property /// public static readonly DependencyProperty RectHeightProperty = DependencyProperty.Register("RectHeight", typeof(double), typeof(RotateRectROI), new PropertyMetadata(100d)); /// /// 矩形角度 /// public double RectAngle { get { return (double)GetValue(RectAngleProperty); } set { SetValue(RectAngleProperty, value); } } // Using a DependencyProperty as the backing store for RectAngle. This enables animation, styling, binding, etc... /// /// 矩形角度Property /// public static readonly DependencyProperty RectAngleProperty = DependencyProperty.Register("RectAngle", typeof(double), typeof(RotateRectROI), new PropertyMetadata(0d)); } }