protected override void CreateChildControls() { this._controlsDescriptor = new ArrayList(); this._overlaysDescriptor = new ArrayList(); foreach (SeadragonControl ctl in this.ControlsCollection) { this.Controls.Add(ctl); this._controlsDescriptor.Add(new { id = ctl.ClientID, anchor = ctl.Anchor }); } foreach (SeadragonOverlay ctl in this.OverlaysCollection) { this.Controls.Add(ctl); if (ctl is SeadragonFixedOverlay) { SeadragonFixedOverlay fixedOverlay = ctl as SeadragonFixedOverlay; this._overlaysDescriptor.Add(new { id = fixedOverlay.ClientID, point = fixedOverlay.Point, placement = fixedOverlay.Placement }); } else { SeadragonScalableOverlay scalableOverlay = ctl as SeadragonScalableOverlay; this._overlaysDescriptor.Add(new { id = scalableOverlay.ClientID, rect = scalableOverlay.Rect }); } } }