Пример #1
0
 public static T EndPoint <T>(this T linegeometry, Point endPoint, RxPointAnimation customAnimation = null) where T : IRxLine
 {
     linegeometry.X2 = endPoint.X;
     linegeometry.Y2 = endPoint.Y;
     linegeometry.AppendAnimatable(LineGeometry.EndPointProperty, customAnimation ?? new RxSimplePointAnimation(endPoint), v =>
     {
         var currentPoint = v.CurrentValue();
         linegeometry.X2  = currentPoint.X;
         linegeometry.Y2  = currentPoint.Y;
     });
     return(linegeometry);
 }
Пример #2
0
 public static T StartPoint <T>(this T linegeometry, Point startPoint, RxPointAnimation customAnimation = null) where T : IRxLineGeometry
 {
     linegeometry.StartPoint = startPoint;
     linegeometry.AppendAnimatable(LineGeometry.StartPointProperty, customAnimation ?? new RxSimplePointAnimation(startPoint), v => linegeometry.StartPoint = v.CurrentValue());
     return(linegeometry);
 }
Пример #3
0
 public static T Center <T>(this T ellipsegeometry, Point center, RxPointAnimation customAnimation = null) where T : IRxEllipseGeometry
 {
     ellipsegeometry.CenterPosition = center;
     ellipsegeometry.AppendAnimatable(EllipseGeometry.CenterProperty, customAnimation ?? new RxSimplePointAnimation(center), v => ellipsegeometry.CenterPosition = v.CurrentValue());
     return(ellipsegeometry);
 }