Layout child to follow resize


I have a GoGroup consisting of a GoRoundedRectangle and a GoText. The text should anchor to the top edge of the rectangle. This is fine when dragging, but when the GoRectangle is resized at the edge the text is anchored to, the text does not move. So if the rectangle is rezied smaller from the top edge, the bounds of the group do not change. I have not had this problem using LayoutChildren with various other groups, but this one has me stumped. How should I handle this situation?


Did you override GoGroup.LayoutChildren to make sure the positions of the GoRoundedRectangle and the GoText were where you wanted them to be?
If you just size and position the children of a GoGroup, everything should be fine until either the whole group is resized or until any child is resized or repositioned. Since GoGroup cannot know what constraints (if any) you want to impose, you need to override LayoutChildren to do what you want.