DesignerActionService 類別

定義

建立管理元件之 DesignerActionItem 物件集合的設計階段服務。

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

備註

類別 DesignerActionService 負責管理元件在設計時間存在於表單上之每個實例的物件集合 DesignerActionItem 。 這個類別會啟用專案建立的直接推送模型,主要是供設計時間工具開發人員使用,雖然元件和自定義控件開發人員也可以使用它。

設計時間工具開發人員必須決定要針對元件顯示的專案清單,並判斷此列表何時變更。 它們也可以建立與智慧標記面板物件搭配運作的載入宏。

進階元件開發人員可能需要動態控制與元件相關聯的專案,因此取代或補充標準提取模型。 例如,視面板命令的使用內容和元件的設計時間狀態而定,可以改變面板命令。

注意

DesignerActionService實際上是推送和提取模型背後的驅動服務;不過,在後者的情況下,它會隱含運作。

DesignerActionService 提供簡單的介面,可讓您存取及操作每個元件的專案,包括下列方法和事件:

因為通常想要在元件的設計時間快捷方式功能表及其面板中使用一些相同的面板專案,所以對象和設計工具動詞之間 DesignerActionItem 存在大量的互操作性。

如果元件設計工具未明確指定 DesignerActionList (,它不包含覆 ActionLists 寫的屬性) ,則會從現有的設計工具動詞命令建立清單。 這些動詞是由 屬性所指定 Verbs 。 在此情況下,會使用內部動詞清單類別來包含動詞專案面板專案的集合。

如果您想要 DesignerActionMethodItem 同時使用 做為面板專案和設計時間快捷方式功能表項,您可以在專案的建構函式中設定 includeAsDesignerVerb 參數。

DesignerActionUIService使用 來控制設計工具 的ActionLists顯示。

建構函式

DesignerActionService(IServiceProvider)

初始化 DesignerActionService 類別的新執行個體。

方法

Add(IComponent, DesignerActionList)

DesignerActionList 加入受管理智慧標籤的目前集合。

Add(IComponent, DesignerActionListCollection)

DesignerActionListCollection 加入受管理智慧標籤的目前集合。

Clear()

釋放管理的所有元件並清除所有推入模型智慧標籤清單。

Contains(IComponent)

決定目前智慧標籤服務是否為指定元件管理動作清單。

Dispose()

釋放 DesignerActionService 類別所使用的所有資源。

Dispose(Boolean)

釋放 DesignerActionService 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetComponentActions(IComponent)

傳回與元件相關聯的智慧標籤項目清單集合。

GetComponentActions(IComponent, ComponentActionsType)

傳回與元件相關聯之指定型別的智慧標籤項目清單集合。

GetComponentActions(IComponent, ComponentActionsType)

傳回與元件相關聯之指定型別的設計工具動作專案清單集合。

GetComponentDesignerActions(IComponent, DesignerActionListCollection)

擷取與元件相關聯的提取模型智慧標籤。

GetComponentServiceActions(IComponent, DesignerActionListCollection)

擷取與元件相關聯的推入模型智慧標籤。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
Remove(DesignerActionList)

移除目前服務管理之所有元件的指定智慧標籤清單。

Remove(IComponent)

移除與指定元件相關聯的所有智慧標籤清單。

Remove(IComponent, DesignerActionList)

從指定的元件移除指定的智慧標籤清單。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

事件

DesignerActionListsChanged

發生於移除或加入任何元件的 DesignerActionList 時。

適用於

另請參閱