Selection Adornment on the shape Document

Selection Adornment on the shape “Document” is not working properly. I used the code from (from the section Selection Adornments) and changed the shape “RoundedRectangle” to “Document”. In the picture below you can see my code and the problem I am facing. Please look into this issue.

Thanks in advance.

The problem is that when you use an “Auto” Panel there is a limited area within which the contents (the GraphObjects other than the main Shape) are placed inside the Shape. For a “Rectangle” figure, Shape.spot1 is Spot.TopLeft and Shape.spot2 is Spot.BottomRight, thereby causing the contents to fill the whole area of the Shape.

But for the “Document” figure, the Shape.spot2 is not at the bottom-right corner but above the bottom, so that the contents (such as a TextBlock) do not overlap the wavy bottom edge of that figure. So I suggest that you set:
spot2: go.Spot.BottomRight
on your “Document” figure Shape.