public static void SwitchToHtmlSourceViewer(RichTextBox richTextBox) { if (richTextBox.IsNull()) { throw new ArgumentNullException(); } richTextBox.BringToFront(); }
public static void EmbedHtmlSourceViewer(RichTextBox htmlSourceViewer, Control parent) { if (htmlSourceViewer.IsNull() || parent.IsNull()) { throw new ArgumentNullException(); } htmlSourceViewer.Dock = DockStyle.Fill; htmlSourceViewer.BorderStyle = BorderStyle.None; htmlSourceViewer.ReadOnly = true; htmlSourceViewer.ScrollBars = RichTextBoxScrollBars.Both; parent.Controls.Add(htmlSourceViewer); }