public override void WriteInitializationScript(TextWriter writer) { IClientSideObjectWriter objectWriter = ClientSideObjectWriterFactory.Create(Id, "tSplitter", writer); objectWriter.Start(); objectWriter.Append <SplitterOrientation>("orientation", Orientation, SplitterOrientation.Horizontal); var panes = new List <IDictionary <string, object> >(); Panes.Each(pane => { panes.Add(pane.Serialize()); }); if (panes.Any()) { objectWriter.AppendCollection("panes", panes); } ClientEvents.SerializeTo(objectWriter); objectWriter.Complete(); base.WriteInitializationScript(writer); }