Automatically stretching nodes inside a group


We have a group container which can contain a single element of the type1 and several elements of the type2, the child element are placed in a stack one below another. The children should be nodes so users can select or fold (expand/collapse) them.

The container is stretched automatically to match the width of the widest element. This is expected behaviour. We also want to automatically stretch other children of this element - on the screenshot these are “Element of type 1” and “Element N of type2”. How can we do it?


The new SwimLanes sample in version 1.3 I believe demonstrates what you are looking for. There is a custom GridLayout called StackLayout that makes sure all of the Groups have Shapes that are the same width. You could use an adaptation of that StackLayout as your Group.layout. You probably don’t need the custom resize handles and the custom GroupResizingTool. I don’t know if you need the “stayInGroup” functionality.