In Silverlight, is there a way to programmatically increase the height of a rectangle upwards? At the moment, when I use rect.Height = 10;, it expands downwards. I’m trying to create rectangles expanding upwards from zero height so as the user walks along the ground it pops up from the ground. I don’t want to translate the rectangle upwards as the ground is smaller than the max height of the rectangle so I can’t have it pre-existing at a given height.
In Silverlight, is there a way to programmatically increase the height of a rectangle
Share
If you move the rectangle’s Y coordinate up at the same time you change the height, and you should get what you’re looking for.
The issue is that one corner is where the box is registered. I’m guessing that in Silverlight, the upper left-hand corner is where it is registered. Changing the height won’t move the registered corner. So you have to move that and change the height at the same time.