public int CreateEditorInstance(uint grfCreateDoc, string pszMkDocument, string pszPhysicalView, IVsHierarchy pvHier, uint itemid, IntPtr punkDocDataExisting, out IntPtr ppunkDocView, out IntPtr ppunkDocData, out string pbstrEditorCaption, out Guid pguidCmdUI, out int pgrfCDW) { ppunkDocData = IntPtr.Zero; ppunkDocView = IntPtr.Zero; pguidCmdUI = typeof(SimpleEditorFactory).GUID; pbstrEditorCaption = null; pgrfCDW = 0; // Validate Inputs if ((grfCreateDoc & (VSConstants.CEF_OPENFILE | VSConstants.CEF_SILENT)) == 0) { return(VSConstants.E_INVALIDARG); } if (punkDocDataExisting != IntPtr.Zero) { return(VSConstants.VS_E_INCOMPATIBLEDOCDATA); } SimpleEditorPane docView = new SimpleEditorPane(); ppunkDocView = Marshal.GetIUnknownForObject(docView); ppunkDocData = Marshal.GetIUnknownForObject(docView); return(VSConstants.S_OK); }
public SimpleWPFEditor(SimpleEditorPane editorPane) { this.parentPane = editorPane; InitializeComponent(); }