I'm creating a WPF application where I would like to add a Rectangle each time a button is pressed. This rectangle should have the following Properties: X Coordinate, Y Coordinate, and an Id. The User specifies these properties from textboxes.
After the rectangle has been created, I would like to alter these properties by referencing the Id.
Can someone please assist me with the code for the creation of these rectangles as well as how to alter the properties of the rectangle from the specified Id.
private void addRectangle(int id, double xCoordinate, double yCoordinates)
{
//Create Rectangle
}
private void alterRectangle(int id, double xCoordinate, double
yCoordinates)
{
WHERE
Rectangle.Id = id
SET
Rectangle.xCoordinate = xCoordinate
AND Rectangle.yCoordinate = yCoordinate
}