0
votes

I have multiple shapes on canvas. I need to generate a bounding rectangle around all the selected shapes without altering their existing positions, and I should be able to resize and rotate them as well.

When I resize the whole group, the scale should apply to all the shapes inside. Right now, I'm able to select multiple shapes and to resize them at a time as well, but I don't have a common bounding rectangle for those selected shapes.

I'm a beginner for WPF. Kindly post any ideas regarding the issue.

2
To clarify: do you want to know how to draw the rectange, as Erno's answer addresses, or do you want to know how to calculate the bounding rectangle?Grokys
Hi gorky thanks for considering,I want to draw the bounding rectangle around the shapes and should be able to resize it where the scale is applies to inside shapes as well, just like grouping in MS Powerpoint.Revanth

2 Answers