How to make the Tree Collapsed in the beginning

As stated in the title, i would like the Tree to start collapsed and then using the double click to expand it. My code is practically the same as in the Tree View Sample
maybe of there is a Tree constructor or something.

thank you for your help

In your node template, set Node.isTreeExpanded to false:

  $(go.Node,
      { isTreeExpanded: false },
      . . .
  )