public static RootDesignerView GetInstance (IDesignerHost host) { if (instance == null) instance = new RootDesignerView (host); instance.active = false; return instance; }
public static RootDesignerView GetInstance(IDesignerHost host) { if (instance == null) { instance = new RootDesignerView(host); } instance.active = false; return(instance); }
private void GetView () { IRootDesigner rd = (IRootDesigner) host.GetDesigner (host.RootComponent); this.view = (RootDesignerView) rd.GetView (ViewTechnology.Passthrough); view.BeginLoad (); System.Diagnostics.Trace.WriteLine ("Document created."); }
public void Initialise () { DispatchService.AssertGuiThread (); System.Diagnostics.Trace.WriteLine ("Loading document into DesignerHost"); designerHost.LoadDocument (); System.Diagnostics.Trace.WriteLine ("Loaded document into DesignerHost"); designerHost.Activate (); System.Diagnostics.Trace.WriteLine ("DesignerHost activated; getting designer view"); IRootDesigner rootDesigner = (IRootDesigner)designerHost.GetDesigner (designerHost.RootComponent); designerView = (RootDesignerView)rootDesigner.GetView (ViewTechnology.Default); // designerView.Realized += delegate { // System.Diagnostics.Trace.WriteLine ("Designer view realized"); // }; designerView.Realized += new EventHandler (designerHost.RootDesignerView_Realized); }
public RootDesigner (IComponent component) { System.Diagnostics.Trace.WriteLine ("Creating RootDesigner"); view = RootDesignerView.GetInstance (component.Site.GetService (typeof (IDesignerHost)) as IDesignerHost); }
public void Initialise (string document, string fileName) { DispatchService.AssertGuiThread (); System.Diagnostics.Trace.WriteLine ("Loading document into DesignerHost"); if (document != null) host.Load (document, fileName); else host.NewFile (); System.Diagnostics.Trace.WriteLine ("Loaded document into DesignerHost"); host.Activate (); System.Diagnostics.Trace.WriteLine ("DesignerHost activated; getting designer view"); IRootDesigner rootDesigner = (IRootDesigner) host.GetDesigner (host.RootComponent); designerView = (RootDesignerView) rootDesigner.GetView (ViewTechnology.Passthrough); designerView.Realized += delegate { System.Diagnostics.Trace.WriteLine ("Designer view realized"); }; }