This topic has not yet been rated - Rate this topic

DesignSurfaceManager Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Manages a collection of DesignSurface objects.

System.Object
  System.ComponentModel.Design.DesignSurfaceManager

Namespace:  System.ComponentModel.Design
Assembly:  System.Design (in System.Design.dll)
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class DesignSurfaceManager : IServiceProvider, 
	IDisposable

The DesignSurfaceManager type exposes the following members.

  Name Description
Public method DesignSurfaceManager() Initializes a new instance of the DesignSurfaceManager class.
Public method DesignSurfaceManager(IServiceProvider) Initializes a new instance of the DesignSurfaceManager class.
Top
  Name Description
Public property ActiveDesignSurface Gets or sets the active designer.
Public property DesignSurfaces Gets a collection of design surfaces.
Protected property ServiceContainer Gets the design surface manager's ServiceContainer.
Top
  Name Description
Public method CreateDesignSurface() Creates an instance of a design surface.
Public method CreateDesignSurface(IServiceProvider) Creates an instance of a design surface.
Protected method CreateDesignSurfaceCore Implementation that creates the design surface.
Public method Dispose() Releases the resources used by the DesignSurfaceManager.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the DesignSurfaceManager and optionally releases the managed resources.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetService Gets a service in the design surface manager’s service container.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top
  Name Description
Public event ActiveDesignSurfaceChanged Occurs when the currently active designer changes.
Public event DesignSurfaceCreated Occurs when a designer is created.
Public event DesignSurfaceDisposed Occurs when a designer is disposed.
Public event SelectionChanged Occurs when the global selection changes.
Top

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. Using DesignSurfaceManager is optional, but it is recommended if you intend to have several designer windows.

The DesignSurfaceManager class provides several design-time services automatically. You can override each of these services by replacing them in the protected ServiceContainer property. To replace a service, override the constructor, call base, and make any changes through the protected ServiceContainer property. All services added to the service container that implement the IDisposable interface are disposed when the design surface manager is disposed. The DesignSurfaceManager class provides the IDesignerEventService interface as the default service. 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.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

Windows 8 Consumer Preview, Windows Server 8 Beta, Windows 7, Windows Server 2008 SP2, Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)