DesignerActionService DesignerActionService DesignerActionService DesignerActionService Class

定義

建立設計階段服務,可管理的集合DesignerActionItem元件的物件。Establishes a design-time service that manages the collection of DesignerActionItem objects for components.

public ref class DesignerActionService : IDisposable
public class DesignerActionService : IDisposable
type DesignerActionService = class
    interface IDisposable
Public Class DesignerActionService
Implements IDisposable
繼承
DesignerActionServiceDesignerActionServiceDesignerActionServiceDesignerActionService
衍生
實作

備註

DesignerActionService類別會負責管理集合的DesignerActionItem元件在設計階段在表單上存在的每個執行個體的物件。The DesignerActionService class is responsible for managing the collection of DesignerActionItem objects for each instance of a component that exists on a form at design time. 這個類別可讓項目建立時直接推送模型,而且主要是用於設計階段工具開發人員,不過也可以使用由元件和自訂控制項開發人員。This class enables a direct push model of item creation, and is primarily intended for use by design-time tool developers, although it can also be used by component and custom control developers.

設計階段工具開發人員必須決定要顯示的元件,並判斷當變更此清單的項目清單。Design-time tool developers will need to determine the list of items to display for a component and determine when this list changes. 它們也可以建立增益集運作搭配智慧標籤面板物件。They may also create add-ins that operate in conjunction with smart tag panel objects.

進階開發人員可能需要以動態方式控制與元件相關聯的項目,因此取代或補充標準提取模型的元件。Advanced component developers may need to dynamically control the items associated with a component, thus replacing or supplementing the standard pull model. 比方說,可以改變面板命令,根據其使用和元件的設計階段狀態的內容。For example, panel commands can be altered depending on the context of their use and the design-time state of the component.

注意

DesignerActionService實際上是駕駛服務背後推送和提取模型; 不過,在後者的情況下,它會隱含地運作。The DesignerActionService is actually the driving service behind both the push and pull models; however, in the latter case it operates implicitly.

DesignerActionService 提供直覺式的介面來存取及管理每個元件,包括下列方法和事件的項目:DesignerActionService provides a straightforward interface for accessing and manipulating the items for each component, including the following methods and events:

大規模的互通性,通常會建議使用的相同元件的設計階段的快顯功能表和其面板中的控制台項目部分,因為之間存在DesignerActionItem物件和設計工具動詞命令。Because it is often desirable to use some of the same panel items in both the component's design-time shortcut menu and its panel, a large degree of interoperability exists between DesignerActionItem objects and designer verbs.

如果是元件設計工具未明確指定DesignerActionList(也就是它不包含覆寫ActionLists屬性),則會建立清單,從現有的設計工具動詞命令。If a component designer does not explicitly specify a DesignerActionList (that is, it does not contain an overridden ActionLists property), then a list will be created from existing designer verbs. 這些動詞由Verbs屬性。These verbs are specified by the Verbs property. 在此情況下,內部的動詞命令清單類別用來包含動詞命令包含項目面板項目的集合。In this case, an internal verb list class is used to contain the collection of verb item panel entries.

如果您想DesignerActionMethodItem若要使用的面板項目和設計階段的快顯功能表項目,則您可以將includeAsDesignerVerb項目的建構函式中的參數。If you want a DesignerActionMethodItem to be used both as a panel entry and a design-time shortcut menu entry, then you can set the includeAsDesignerVerb parameter in the item's constructor.

使用DesignerActionUIService以控制您的設計工具顯示ActionListsUse the DesignerActionUIService to control the display of your designer's ActionLists.

建構函式

DesignerActionService(IServiceProvider) DesignerActionService(IServiceProvider) DesignerActionService(IServiceProvider) DesignerActionService(IServiceProvider)

初始化 DesignerActionService 類別的新執行個體。Initializes a new instance of the DesignerActionService class.

方法

Add(IComponent, DesignerActionList) Add(IComponent, DesignerActionList) Add(IComponent, DesignerActionList) Add(IComponent, DesignerActionList)

新增DesignerActionList至受管理智慧標籤目前的集合。Adds a DesignerActionList to the current collection of managed smart tags.

Add(IComponent, DesignerActionListCollection) Add(IComponent, DesignerActionListCollection) Add(IComponent, DesignerActionListCollection) Add(IComponent, DesignerActionListCollection)

新增DesignerActionListCollection至受管理智慧標籤目前的集合。Adds a DesignerActionListCollection to the current collection of managed smart tags.

Clear() Clear() Clear() Clear()

釋放管理的所有元件並清除所有推入模型智慧標籤清單。Releases all components from management and clears all push-model smart tag lists.

Contains(IComponent) Contains(IComponent) Contains(IComponent) Contains(IComponent)

判斷目前的智慧標籤服務是否管理指定之元件的動作清單。Determines whether the current smart tag service manages the action lists for the specified component.

Dispose() Dispose() Dispose() Dispose()

釋放 DesignerActionService 類別所使用的所有資源。Releases all resources used by the DesignerActionService class.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

釋放 DesignerActionService 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the DesignerActionService and optionally releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetComponentActions(IComponent) GetComponentActions(IComponent) GetComponentActions(IComponent) GetComponentActions(IComponent)

傳回與元件相關聯的智慧標籤項目清單集合。Returns the collection of smart tag item lists associated with a component.

GetComponentActions(IComponent, ComponentActionsType) GetComponentActions(IComponent, ComponentActionsType) GetComponentActions(IComponent, ComponentActionsType) GetComponentActions(IComponent, ComponentActionsType)

傳回的智慧標籤集合與元件相關聯之指定類型的項目清單。Returns the collection of smart tag item lists of the specified type associated with a component.

GetComponentActions(IComponent, ComponentActionsType) GetComponentActions(IComponent, ComponentActionsType) GetComponentActions(IComponent, ComponentActionsType) GetComponentActions(IComponent, ComponentActionsType)
GetComponentDesignerActions(IComponent, DesignerActionListCollection) GetComponentDesignerActions(IComponent, DesignerActionListCollection) GetComponentDesignerActions(IComponent, DesignerActionListCollection) GetComponentDesignerActions(IComponent, DesignerActionListCollection)

擷取與元件相關聯的提取模型智慧標籤。Retrieves the pull-model smart tags associated with a component.

GetComponentServiceActions(IComponent, DesignerActionListCollection) GetComponentServiceActions(IComponent, DesignerActionListCollection) GetComponentServiceActions(IComponent, DesignerActionListCollection) GetComponentServiceActions(IComponent, DesignerActionListCollection)

擷取與元件相關聯的推入模型智慧標籤。Retrieves the push-model smart tags associated with a component.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(DesignerActionList) Remove(DesignerActionList) Remove(DesignerActionList) Remove(DesignerActionList)

從目前的服務所管理的所有元件中移除指定的智慧標籤清單。Removes the specified smart tag list from all components managed by the current service.

Remove(IComponent) Remove(IComponent) Remove(IComponent) Remove(IComponent)

移除與指定的元件相關聯的所有智慧標籤清單。Removes all the smart tag lists associated with the specified component.

Remove(IComponent, DesignerActionList) Remove(IComponent, DesignerActionList) Remove(IComponent, DesignerActionList) Remove(IComponent, DesignerActionList)

從指定的元件中移除指定的智慧標籤清單。Removes the specified smart tag list from the specified component.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

事件

DesignerActionListsChanged DesignerActionListsChanged DesignerActionListsChanged DesignerActionListsChanged

發生時DesignerActionList移除或加入任何元件。Occurs when a DesignerActionList is removed or added for any component.

適用於

另請參閱