public DragableObject(string Name) { this.Name = Name; Location = new BindablePoint() { X = 0, Y = 0, }; Size = new BindablePoint() { X = 100, Y = 100, }; }
/// <summary> /// 起点,中间点,终点的改变都会改变PointV /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MidPoint_OnPointChanged(object sender, BindablePoint e) { RaisePropertyChanged("PointV"); }
public LineBez(string Name, BindablePoint P1, BindablePoint P2) : base(Name) { this.StartPoint = P1; this.EndPoint = P2; MidPoint = (P1 + P2) / 2; }
private void Location_OnPointChanged(object sender, BindablePoint e) { RecalculateSnaps(); }