Scripts are set and edited in the template designer and are stored together with the template. They are stored as text in string properties of the object and are available in the Property Grid.
All template objects have properties of the "Script" group; there you can set scripts of various types.
Scripts of a special type Property Binding are set on the "Bindings" section of the Property Grid.
To get immediate access to Property Bindings you can use special elements on the Binding bar.
There is a special Script Editor with syntax highlighting and code completion designed for scripts editing.