1 Reply Latest reply on Feb 17, 2009 6:35 PM by garybentley

    Determining preferred size of a container


      Does anyone know how to determine the preferred size of a container that hasn't had it's height/width set?

      There are two aspects to this:

      1. I would like to resize a container from 0,0 height/width to it's preferred size.

      2. Sometimes the children of the container will be larger than any arbitrary size that I specify so I need to know when this occurs so I can expand the size accordingly.

      Anyone any ideas how to do this?

      I've tried properties:


      all to no avail. They all return 0,0 even if I don't specify the initial height/width to 0 and have added it to the parent container (in this case a WindowedApplication).

      Any suggestions would be appreciated :)