dotnetmonitor.com

 
Index
Previous
Next

 

The new DesignSurface class drastically simplifies the code necessary to host a designer in your own application. The following lines of code show the most simple designer that can be created. Note: to run this code, a reference to System.Design.dll will need to be added.

 

DesignSurface surface = new DesignSurface(typeof(Form));

Control c = surface.View as Control;

if (c != null)

{

c.Dock = DockStyle.Fill;

this.Controls.Add(c);

}

 

In any realistic application that selects, modifies and creates components, instance of IDesignerHost, ISelectionService, IComponentChangeService, and IToolboxService will be needed to interact with the hosted designer.

What is a smart tag?
What are the types of DesignerActionItems?
How do I add a smart tag to my control?
How can I refresh the smart tag panel for my control?
How can I modify smart tags on existing controls?
How do I get undo to work for smart tag items?