public TableColumnSizeEditor(IHTMLTable table, IHtmlEditorComponentContext editorContext, IHTMLPaintSiteRaw paintSite) { Debug.Assert(((IHTMLElement)table).offsetHeight > 0 && ((IHTMLElement)table).offsetWidth > 0, "TableColumnSizeEditor unexpectedly attached to a table with no height and/or width!"); // save references _table = table; _editorContext = editorContext; _paintSite = paintSite; // initialize sizing _sizingOperation = new SizingOperation(_editorContext, _table); // initialize table editing context _tableEditingContext = new TableEditingContext(editorContext); // subscribe to events _editorContext.PreHandleEvent += new OpenLiveWriter.Mshtml.HtmlEditDesignerEventHandler(_editorContext_PreHandleEvent); }