/// <summary> /// We override VsWindowPane's version of this so we can hand our site /// back to the designer host. This is necessary so we can get the /// right service routing. /// </summary> protected override void OnServicesAvailable() { // get our site object site = null; Guid g = typeof(NativeMethods.IOleServiceProvider).GUID; site = this.GetSite(ref g); if (site != null) { NativeMethods.IObjectWithSite ows = (NativeMethods.IObjectWithSite)host.GetService(typeof(NativeMethods.IObjectWithSite)); if (ows != null) { ows.SetSite(site); } } else { Debug.Fail("Failed to get site for DesignerHost"); } // Signal our perf driver that this event is complete. This signals that the // designer has been created and shown. // DesignerPackage.SignalPerformanceEvent(); }
// so we can control recreates, etc internal Control GetOuterWindow() { if (holderWindow == null) { holderWindow = new HolderWindow(this, GetWindow()); Font font = null; IUIService uisvc = (IUIService)GetService(typeof(IUIService)); if (uisvc != null) { font = (Font)uisvc.Styles["DialogFont"]; } else { IUIHostLocale locale = (IUIHostLocale)GetService(typeof(IUIHostLocale)); if (locale != null) { font = DesignerPackage.GetFontFromShell(locale); } } holderWindow.Font = (font == null ? Control.DefaultFont : font); } return(holderWindow); }
public ProjectManager(DesignerPackage package) : base() { this.package = package; }
public Factory(DesignerPackage package) : base() { this.package = package; }