Position the bottom left of the rectangle.




void Position(double x, double y)
void Position(double x, double y, Corner corner)

[Visual Basic]
Sub Position(x As Double, y As Double)
Sub Position(x As Double, y As Double, corner As Corner)



Name Description
x The new left position.
y The new bottom position.
corner The corner to position.




Moves the rectangle to the supplied position while maintaining the width and height.

The corner moved to the location is indicated by the Pin property but you can override this default by specifying a corner when calling this function.




The following code.


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

Produces the following output.

Rect = 20 20 220 120
Pos. = 50 50 250 150