DesignSurfaceManager DesignSurfaceManager DesignSurfaceManager DesignSurfaceManager Class

定義

管理 DesignSurface 物件的集合。Manages a collection of DesignSurface objects.

public ref class DesignSurfaceManager : IDisposable, IServiceProvider
[System.Security.SecurityCritical]
public class DesignSurfaceManager : IDisposable, IServiceProvider
type DesignSurfaceManager = class
    interface IServiceProvider
    interface IDisposable
Public Class DesignSurfaceManager
Implements IDisposable, IServiceProvider
繼承
DesignSurfaceManagerDesignSurfaceManagerDesignSurfaceManagerDesignSurfaceManager
屬性
實作

備註

DesignSurfaceManager類別設計為容器DesignSurface物件。The DesignSurfaceManager class is designed to be a container of DesignSurface objects. 它提供通用服務該控制代碼設計工具、 屬性 視窗中,與其他全域物件之間的事件路由。It provides common services that handle event routing between designers, property windows, and other global objects. 使用DesignSurfaceManager是選擇性的但仍建議如果您想要擁有數個設計工具視窗。Using DesignSurfaceManager is optional, but it is recommended if you intend to have several designer windows.

DesignSurfaceManager類別會自動提供數個設計階段服務。The DesignSurfaceManager class provides several design-time services automatically. 您可以覆寫的每個這些服務並取代在受保護ServiceContainer屬性。You can override each of these services by replacing them in the protected ServiceContainer property. 若要取代的服務,覆寫建構函式、 呼叫基底,並進行任何變更透過受保護ServiceContainer屬性。To replace a service, override the constructor, call base, and make any changes through the protected ServiceContainer property. 所有的服務新增至服務容器可實作IDisposable處置設計介面管理員時,會處置介面。All services added to the service container that implement the IDisposable interface are disposed when the design surface manager is disposed. DesignSurfaceManager類別提供IDesignerEventService為預設服務的介面。The DesignSurfaceManager class provides the IDesignerEventService interface as the default service. IDesignerEventService 提供通用的事件處理機制,設計工具的事件。IDesignerEventService provides a global eventing mechanism for designer events. 使用這種機制,設計工具變成作用中時通知應用程式。With this mechanism, an application is informed when a designer becomes active. 此服務會提供設計工具的集合和全域物件,例如 [屬性] 視窗中,可以監視選取的其中一個位置變更事件。The service provides a collection of designers and a single place where global objects, such as the Properties window, can monitor selection change events.

建構函式

DesignSurfaceManager() DesignSurfaceManager() DesignSurfaceManager() DesignSurfaceManager()

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

DesignSurfaceManager(IServiceProvider) DesignSurfaceManager(IServiceProvider) DesignSurfaceManager(IServiceProvider) DesignSurfaceManager(IServiceProvider)

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

屬性

ActiveDesignSurface ActiveDesignSurface ActiveDesignSurface ActiveDesignSurface

取得或設定使用中的設計工具。Gets or sets the active designer.

DesignSurfaces DesignSurfaces DesignSurfaces DesignSurfaces

取得設計介面的集合。Gets a collection of design surfaces.

ServiceContainer ServiceContainer ServiceContainer ServiceContainer

取得設計介面管理員的 ServiceContainerGets the design surface manager's ServiceContainer.

方法

CreateDesignSurface() CreateDesignSurface() CreateDesignSurface() CreateDesignSurface()

建立設計介面的執行個體。Creates an instance of a design surface.

CreateDesignSurface(IServiceProvider) CreateDesignSurface(IServiceProvider) CreateDesignSurface(IServiceProvider) CreateDesignSurface(IServiceProvider)

建立設計介面的執行個體。Creates an instance of a design surface.

CreateDesignSurfaceCore(IServiceProvider) CreateDesignSurfaceCore(IServiceProvider) CreateDesignSurfaceCore(IServiceProvider) CreateDesignSurfaceCore(IServiceProvider)

建立設計介面的實作。Implementation that creates the design surface.

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

釋放 DesignSurfaceManager 使用的資源。Releases the resources used by the DesignSurfaceManager.

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

釋放 DesignSurfaceManager 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the DesignSurfaceManager 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)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetService(Type) GetService(Type) GetService(Type) GetService(Type)

取得設計介面管理員服務容器中的服務。Gets a service in the design surface manager's service container.

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)
ToString() ToString() ToString() ToString()

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

(Inherited from Object)

事件

ActiveDesignSurfaceChanged ActiveDesignSurfaceChanged ActiveDesignSurfaceChanged ActiveDesignSurfaceChanged

發生於目前使用中的設計工具變更時。Occurs when the currently active designer changes.

DesignSurfaceCreated DesignSurfaceCreated DesignSurfaceCreated DesignSurfaceCreated

發生於設計工具建立時。Occurs when a designer is created.

DesignSurfaceDisposed DesignSurfaceDisposed DesignSurfaceDisposed DesignSurfaceDisposed

發生於處置設計工具時。Occurs when a designer is disposed.

SelectionChanged SelectionChanged SelectionChanged SelectionChanged

發生於全域選取變更時。Occurs when the global selection changes.

安全性

NamedPermissionSet
取得的完整存取系統資源。for full access to system resources. 要求的值: LinkDemandInheritanceDemandDemand values: LinkDemand, InheritanceDemand. 相關聯的狀態:Associated state:

適用於

另請參閱