System.ComponentModel.Design 命名空間
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
包含開發者可用來建立元件自訂設計時行為的類別,以及設計時配置元件的使用者介面。 設計時環境提供系統,讓開發者能夠排列元件並設定其屬性。 有些元件可能需要特定的設計時行為,才能在設計時環境中正常運作。 提供自訂使用者介面,協助開發者設定元件或複雜資料型態的值,也可能很有價值。 此命名空間中定義的類別與介面可用於建立元件的設計時行為、存取設計時服務,並實作客製化的設計時配置介面。
類別
介面
| 名稱 | Description |
|---|---|
| IComponentChangeService |
提供一個介面,用於新增、變更、移除或重新命名元件的事件處理程序,並提供提出 ComponentChanged OR ComponentChanging 事件的方法。 |
| IComponentDesignerDebugService |
提供設計時環境中的除錯服務。 |
| IComponentDesignerStateService |
允許設計者儲存並檢索其狀態。 |
| IComponentDiscoveryService |
可在設計時枚舉元件。 |
| IComponentInitializer |
在元件建立時提供一組建議的預設值。 |
| IDesigner |
提供建置自定義設計工具的基本架構。 |
| IDesignerEventService |
當根設計器新增或移除、所選元件變更,以及當前根設計器變更時,提供事件通知。 |
| IDesignerFilter |
提供一個介面,讓設計師能夠存取並過濾儲存屬性、屬性及事件描述符的字典 TypeDescriptor ,這些描述符是元件設計師可向設計時環境暴露的。 |
| IDesignerHost |
提供管理設計商交易與元件的介面。 |
| IDesignerHostTransactionState |
規範設計主機回報交易狀態的方法。 |
| IDesignerOptionService |
提供位於Visual Studio開發環境中 |
| IDesignTimeAssemblyLoader |
設計器中載入組件的實用性。 |
| IDictionaryService |
透過服務提供基本的元件、特定地點的鍵值對字典,設計者可使用以儲存使用者定義的資料。 |
| IEventBindingService |
提供一項用於註冊元件事件事件處理程序的服務。 |
| IExtenderListService |
提供一個介面,可列出擴充器提供者。 |
| IExtenderProviderService |
提供設計時新增與移除擴展器提供者的介面。 |
| IHelpService |
提供在設計時顯示說明主題及新增與移除幫助關鍵字的方法。 |
| IInheritanceService |
提供識別元件組成元件的方法。 |
| IMenuCommandService |
提供管理設計模式中全域設計動詞與選單指令的方法,並顯示某些類型的快捷選單。 |
| IMultitargetHelperService |
定義設計時環境中的多目標類型名稱解析服務。 |
| IReferenceService |
提供介面,用於透過名稱或類型取得專案中物件的參考、取得指定物件名稱,以及在設計專案中定位指定物件的父節點。 |
| IResourceService |
提供介面,讓設計師能存取特定 CultureInfo 資源類型的資源閱讀器與寫入器。 |
| IRootDesigner |
提供根層級設計工具檢視技術的支援。 |
| ISelectionService |
提供設計者選擇元件的介面。 |
| IServiceContainer |
提供服務容器。 |
| ITreeDesigner |
提供建置一組相關自定義設計工具的支援。 |
| ITypeDescriptorFilterService |
提供介面以修改設計模式下元件的成員描述符集合。 |
| ITypeDiscoveryService |
在設計時發現可用類型。 |
| ITypeResolutionService |
提供一個介面,可以透過名稱檢索組件或型別。 |
列舉
| 名稱 | Description |
|---|---|
| ComponentActionsType |
指定物件系結智慧標記的類型,其與元件建立關聯的方式。 |
| DesignerActionListsChangedType |
指定 DesignerActionList 物件集合中發生的變更類型。 |
| DesignerActionUIStateChangeType |
指定智慧標記面板的顯示狀態。 |
| DisplayMode |
定義標識碼,指出 ByteViewer所使用的顯示模式。 |
| HelpContextType |
定義標識碼,指出要求說明資訊的來源內容相關信息。 |
| HelpKeywordType |
定義標識碼,指出 Help 關鍵詞的類型。 |
| MenuCommandsChangedType |
指定相關物件 MenuCommands 集合所發生的動作類型。 |
| SelectionTypes |
定義標識碼,指出選取範圍的型別。 |
| ViewTechnology |
定義設計工具所支援之一組技術的標識碼。 |
委派
備註
此命名空間中的類別包括:
一個 IDesigner 基本介面,可以用來自訂特定元件類型的設計時行為。
一個 ComponentDesigner 提供更進階設計基底類別的類別,實作 IDesigner、 IDisposable、 及 IDesignerFilter 介面。
設計介面與服務,讓設計者能支援額外功能,包括:
- IComponentChangeService
- IDesignerEventService
- IDesignerFilter
- IDesignerHost
- IDesignerOptionService
- IDictionaryService
- IEventBindingService
- IExtenderListService
- IExtenderProviderService
- IHelpService
- IInheritanceService
- IMenuCommandService
- IReferenceService
- IResourceService
- IRootDesigner
- ISelectionService
- IServiceContainer
- ITypeDescriptorFilterService
- ITypeResolutionService
可用於自訂設計時授權上下文管理與序列化的類別: DesigntimeLicenseContext 以及 DesigntimeLicenseContextSerializer。
可擴充的簡單集合編輯器: ArrayEditor 和 CollectionEditor。