I am trying to make a Rectangle (or a UserControl for that matter) lap over its bounds that are given in the grid.
I’ve constructed a grid with 3X3 items in it. These items (when hovered over) should expand their size by multiplying it by 2. However, since these items have been given specific boundaries (as in they are actually members of columns and rows), they do not overlap those boundaries.
How can I do this?
Using a grid in this case is not the best option, consider using a canvas or maybe a wrap panel. Due to the way the WPF layout system works (Arrange/Measure), elements can normally not cross their boundaries.
Alternatively, using a
ScaleTransformon your elements’RenderTransformproperty will also do the trick. Check out this article for more information about transformations.