How Many Copies of Gestalt Get Loaded?
If you have zero or one XAML blocks on your page, Gestalt will be instantiated only once, no matter how many script blocks you have on the page. This means that, if you are using Gestalt purely for DOM manipulation with Ruby or Python, you will have only one instance of Gestalt loaded, sharing global state, exactly as you would expect with JavaScript, regardless of how many script blocks you have. If you have more than one distinct XAML block, Gestalt is instantiated exactly once per XAML block (again, regardless of the number of script blocks). This is because the XAML blocks are loaded in Silverlight, which does not support multiple blocks per Silverlight instance. Therefore, you probably don’t want to use more than 5 or 10 distinct XAML blocks on a page, just as you wouldn’t want to use that many distinct Silverlight controls.