|
class Designer : System.ComponentModel.Design.DesignSurface
{
public Designer()
{
// Service of creation of name
ServiceContainer.AddService(
typeof(System.ComponentModel.Design.Serialization.INameCreationService),
new NameCreationService());
// Service of management of the toolbox
ServiceContainer.AddService(
typeof(System.Drawing.Design.IToolboxService), new ToolBoxService());
// Service of view of the host
ServiceContainer.AddService(typeof(ViewService), new ViewService());
// Service of management of the menus ServiceContainer.AddService(
typeof(System.ComponentModel.Design.IMenuCommandService), new MenuCommandService(this.ServiceContainer));
// Management of options of design
System.Windows.Forms.Design.WindowsFormsDesignerOptionService designerOptionService = new System.Windows.Forms.Design.WindowsFormsDesignerOptionService();
// It is specified that one goes use the grid to place the components
designerOptionService.CompatibilityOptions.ShowGrid = true;
ServiceContainer.AddService(
typeof(System.ComponentModel.Design.DesignerOptionService), designerOptionService);
}
} |