设计器宿主是窗体设计器的核心。
设计器宿主是到设计时环境的挂钩。
The designer host is the hook into the design-time environment.
请注意,站点的构造函数接受设计器宿主实例。
Note that the site's constructor accepts a designer host instance.
最后,将新组件添加到设计器宿主容器中。
Finally, the new component is added to the designer host container.
使用指定的设计器宿主,根据指定的标记创建控件。
Creates a control from the specified markup using the specified designer host.
为指定的数据格式和设计器宿主添加新的工具箱项创建者。
Adds a new toolbox item creator for a specified data format and designer host.
使用指定的设计器宿主和指令,根据指定的标记创建控件。
Creates a control from the specified markup using the specified designer host and directives.
该服务由设计器宿主提供,这是因为组件是通过宿主创建和销毁的。
This service is offered by the designer host because components get created and destroyed through the host.
使用指定的设计器宿主创建工具箱项的配置中指定要创建的组件。
Creates the components that the toolbox item is configured to create, using the specified designer host.
从工具箱获取与指定的设计器宿主和类别关联的工具箱项的集合。
Gets the collection of toolbox items that are associated with the specified designer host and category from the toolbox.
设计器宿主使用设计时环境来管理设计器状态、活动(例如,事务)和组件。
The designer host works with the design-time environment to manage designer state, activities (such as transactions), and components.
使用指定的设计器宿主和默认值创建工具箱项的配置中指定要创建的组件。
Creates the components that the toolbox item is configured to create, using the specified designer host and default values.
处理根组件是设计器宿主、设计时环境和用户界面之间的粘合剂的唯一需要技巧的部分。
Handling the root component is the only tricky part of the adhesive between the designer host, the design-time environment, and the user interface.
在将组件放到窗体中时,设计器宿主会为该组件和它的容器创建一个站点实例。
When you place a component on a form, the designer-host creates a site instance for the component and its container.
站点构造函数采用设计器宿主和组件,以便可以建立图2中所示的组件-容器关系。
The site constructor takes the designer host and the component so that it can establish the component-container relationship shown in Figure 2.
使用指定的设计器宿主,从以序列化形式表示工具箱项的指定对象获取工具箱项。
Gets a toolbox item from the specified object that represents a toolbox item in serialized form, using the specified designer host.
获取一个值,该值指示指定的设计器宿主是否可使用表示一个被序列化的工具箱项的指定对象。
Gets a value indicating whether the specified object which represents a serialized toolbox item can be used by the specified designer host.
获取一个值,该值指示根序列化程序是否支持在不首先释放设计器宿主的条件下即可重新加载设计文档。
Gets a value indicating whether the root serializer supports reloading of the design document without first disposing the designer host.
该过程的最后一步是将服务实现挂钩到设计时环境中—在讨论完如何实现设计器宿主之后,我将演示如何进行挂钩。
The final step in the process is to hook the service implementation into the design-time environment, which I'll demonstrate how to do after I discuss how to implement the designer host.
设计器宿主接口idesignerhost定义了用于创建和移除组件的方法,因此如果宿主提供了该服务,您不应当感到吃惊。
The designer host interface, IDesignerHost, defines methods to create and remove components, so you shouldn't be surprised if the host offers this service.
您将注意到Site Impl还实现了IDictionaryService,这有一点儿不同寻常,因为我实现的所有其他服务都绑定到设计器宿主。
You'll notice that the SiteImpl also implements IDictionaryService, which is a bit unusual because all of the other services I implemented were tied to the designer host.
获取或设置一个值,指示设计宿主是否在设计器区域上显式设置区域大小。
Gets or sets a value indicating whether the region size is to be explicitly set on the designer region by the design host.
这是一个可选的宿主服务,控件设计器不应假定它总会提供此服务。
This is an optional host service, and control designers should not assume it will always be provided.
设计时,自定义控件的设计器组件与其设计宿主运行在同一个信任级别。
At design time, the designer component of a custom control runs with the same level of trust as its design host.
此外,不能使用代码访问配置来限制对控件设计器的访问,因为这些设计器必须总是以完全信任级别运行在设计宿主中。
Also, you cannot use code access configuration to limit access for control designers since they must always run in the design host with full trust.
此外,不能使用代码访问配置来限制对控件设计器的访问,因为这些设计器必须总是以完全信任级别运行在设计宿主中。
Also, you cannot use code access configuration to limit access for control designers since they must always run in the design host with full trust.
应用推荐