Translate the rectangle.

 

   

Syntax
 

[C#]
void Move(double x, double y)

[Visual Basic]
Sub Move(x As Double, y As Double)

 

   

Params
 
Name Description
x The horizontal distance to move the rectangle.
y The vertical distance to move the rectangle.

 

   

Notes
 

Moves the rectangle maintaining the width and height.

 

   

Example
 

The following code.

 

XRect rc = new XRect(); rc.String = "20 20 220 120"; Response.Write($"Rect = {rc}"); rc.Move(50, 50); Response.Write("<br>"); Response.Write($"Move = {rc}");

Produces the following output.

Rect = 20 20 220 120
Move = 70 70 270 170