語言

DesignSurface 建構函式

定義

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

多載

名稱 Description
DesignSurface()

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

DesignSurface(IServiceProvider)

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

DesignSurface(Type)

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

DesignSurface(IServiceProvider, Type)

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

DesignSurface()

來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs

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

public:
 DesignSurface();
public DesignSurface();
Public Sub New ()

例外狀況

適用於

DesignSurface(IServiceProvider)

來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs

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

public:
 DesignSurface(IServiceProvider ^ parentProvider);
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.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs

初始化 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呼叫空構造子,將 加入 DesignerOptionsServiceContainer ,並呼叫 。BeginLoadrootComponentType

適用於

DesignSurface(IServiceProvider, Type)

來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs
來源:
DesignSurface.cs

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

public:
 DesignSurface(IServiceProvider ^ parentProvider, Type ^ rootComponentType);
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 呼叫並傳遞根元件類型。

另請參閱

適用於