private void ChangePosition2(Point point) { Point position1 = ForPoint.GetValueAsPoint(transforms.translate); Point size = ForPoint.Subtraction(point, position1); form.Width = Math.Abs(size.X); form.Height = Math.Abs(size.Y); //Если нужно отражаем по X transforms.scale.ScaleX = (size.X > 0) ? 1 : -1; //Если нужно отражаем по Y transforms.scale.ScaleY = (size.Y > 0) ? 1 : -1; }
public static Point GetPoint1(FrameworkElement element, System.Windows.Media.TranslateTransform translate) { return(ForPoint.GetValueAsPoint(translate)); }