DesignSurface 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 DesignSurface 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| DesignSurface() |
初始化 DesignSurface 類別的新執行個體。 |
| DesignSurface(IServiceProvider) |
初始化 DesignSurface 類別的新執行個體。 |
| DesignSurface(Type) |
初始化 DesignSurface 類別的新執行個體。 |
| DesignSurface(IServiceProvider, Type) |
初始化 DesignSurface 類別的新執行個體。 |
DesignSurface()
初始化 DesignSurface 類別的新執行個體。
public:
DesignSurface();
public DesignSurface();
Public Sub New ()
例外狀況
適用於
DesignSurface(IServiceProvider)
初始化 DesignSurface 類別的新執行個體。
public:
DesignSurface(IServiceProvider ^ parentProvider);
public DesignSurface(IServiceProvider parentProvider);
new System.ComponentModel.Design.DesignSurface : IServiceProvider -> System.ComponentModel.Design.DesignSurface
Public Sub New (parentProvider As IServiceProvider)
參數
- parentProvider
- IServiceProvider
母服務提供者,或 null 如果沒有母服務提供者,則使用來解決服務。
例外狀況
備註
當 parentProvide 存在時,包含在表面層內的設計者可以從應用程式中檢索服務。
另請參閱
適用於
DesignSurface(Type)
初始化 DesignSurface 類別的新執行個體。
public:
DesignSurface(Type ^ rootComponentType);
public DesignSurface(Type rootComponentType);
new System.ComponentModel.Design.DesignSurface : Type -> System.ComponentModel.Design.DesignSurface
Public Sub New (rootComponentType As Type)
參數
- rootComponentType
- Type
要建立哪種根元件類型。
例外狀況
rootComponentType 是 null。
備註
當你使用 DesignSurface 建構子時,它會建立一個簡單的設計器載入器,接著建立該類型的元件,然後結束載入過程。 這是一種直接建立設計器的方式,假設所有州權保存都由外部完成。 內部則 BeginLoad 呼叫並傳遞根元件類型。
Note
DesignSurface過載不受 影響DesignerOptions。 必須 DesignerOptions 在設計表面載入前就已進入服務容器。 如果你需要存取 ,DesignerOptions呼叫空構造子,將 加入 ServiceContainerDesignerOptions ,並呼叫 。rootComponentTypeBeginLoad
適用於
DesignSurface(IServiceProvider, Type)
初始化 DesignSurface 類別的新執行個體。
public:
DesignSurface(IServiceProvider ^ parentProvider, Type ^ rootComponentType);
public DesignSurface(IServiceProvider parentProvider, Type rootComponentType);
new System.ComponentModel.Design.DesignSurface : IServiceProvider * Type -> System.ComponentModel.Design.DesignSurface
Public Sub New (parentProvider As IServiceProvider, rootComponentType As Type)
參數
- parentProvider
- IServiceProvider
母服務提供者,或 null 如果沒有母服務提供者,則使用來解決服務。
- rootComponentType
- Type
要建立哪種根元件類型。
例外狀況
rootComponentType 是 null。
備註
使用 DesignSurface 建構子會建立一個簡單的設計器載入器,建立該類型的元件,然後結束載入過程。 這是一種直接建立設計器的方式,假設所有州權保存都由外部完成。 內部則 BeginLoad 呼叫並傳遞根元件類型。