public MainWindow() { InitializeComponent(); editor.ConfigurationManager.Language = "html"; editor.Margins[0].Width = 20; editor.Height = tabEditor.Height; editor.Width = tabEditor.Width; editor.LineWrap.Mode = WrapMode.Word; editor.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; editor.DocumentChange += new EventHandler <NativeScintillaEventArgs>(editor_DocumentChange); tabEditor.Controls.Add(editor); browserDesign.DocumentText = "<html><body></body></html>"; builder = new HTMLBuilder(browserDesign.Document.DomDocument as IHTMLDocument2); builder.EnterDesignMode(); browserDesign.Focus(); }