private void kryptonWorkspace_PageLoading(object sender, PageLoadingEventArgs e) { KryptonRichTextBox rtb; // If a new page then it does not have any children... if (e.Page.Controls.Count == 0) { // Add a rich text box as the child of the page rtb = new KryptonRichTextBox(); rtb.Dock = DockStyle.Fill; rtb.StateCommon.Border.Draw = InheritBool.False; e.Page.Controls.Add(rtb); e.Page.Padding = new Padding(5); } else { rtb = (KryptonRichTextBox)e.Page.Controls[0]; } // Move past the current xml element to the child CData e.XmlReader.Read(); // Read in the stored text and use it in the rich text box rtb.Text = e.XmlReader.ReadContentAsString(); }
private void OnSpaceControlPageLoading(object sender, PageLoadingEventArgs e) { KryptonDockingManager dockingManager = DockingManager; if (dockingManager != null) { DockPageLoadingEventArgs args = new DockPageLoadingEventArgs(dockingManager, e.XmlReader, e.Page); dockingManager.RaisePageLoading(args); } }