/// <summary> /// Constructor that calls the Microsoft.VisualStudio.Shell.WindowPane constructor then /// our initialization functions. /// </summary> /// <param name="package">Our Package instance.</param> public EtoPreviewPane(EtoPreviewPackage package, string fileName, IVsTextLines textBuffer) : base(package) { this.package = package; this.textBuffer = textBuffer; FileName = fileName; builderInfo = BuilderInfo.Find(fileName); if (builderInfo == null) { throw new InvalidOperationException(string.Format("Could not find builder for file {0}", fileName)); } builder = builderInfo.CreateBuilder(); editorControl = new Panel(); previewControl = new Panel(); var split = new Splitter { Panel1 = previewControl, Panel2 = editorControl, Orientation = Orientation.Vertical, FixedPanel = SplitterFixedPanel.None, RelativePosition = 0.5 }; var native = split.ToNative(true); host.Child = native; control = split; }
public EditorFactory(EtoPreviewPackage package) { this.editorPackage = package; }