DesignSurfaceExtensionAttribute Constructor

Creates a new instance of the DesignSurfaceExtensionAttribute class specifying a given object as providing a VSPackage's implementation of DesignSurfaceExtension.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

‘선언
Public Sub New ( _
    extensionType As Type _
)
‘사용 방법
Dim extensionType As Type

Dim instance As New DesignSurfaceExtensionAttribute(extensionType)
public DesignSurfaceExtensionAttribute(
    Type extensionType
)
public:
DesignSurfaceExtensionAttribute(
    Type^ extensionType
)
new : 
        extensionType:Type -> DesignSurfaceExtensionAttribute
public function DesignSurfaceExtensionAttribute(
    extensionType : Type
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

extensionType is nulla null reference (Nothing in Visual Basic).

ArgumentException

extensionType does not derive from DesignSurfaceExtension.

Remarks

Whenever the VSPackage makes use of a design surface, an instance of extensionType object will be used to modify that surface's behavior.

The Type used to construct the DesignSurfaceExtensionAttribute must also be registered as an object provided by the VSPackage, with ProvideObjectAttribute and a service, with ProvideServiceAttribute.

Examples

The example below declares that the VSPackage CustomDesigner, provided the class CustomSurfaceExt to customize the design surface it uses.

[ProvideServiceAttribute(typeof(CustomSurfaceExt))]
[ProvideObjectAttribute(typeof(CustomSurfaceExt))]
[DesignSurfaceExtension(typeof(CustomSurfaceExt))] 
class CustomDesigner : Package 

.NET Framework Security

See Also

Reference

DesignSurfaceExtensionAttribute Class

DesignSurfaceExtensionAttribute Members

Microsoft.VisualStudio.Shell.Design Namespace

DesignSurfaceExtensionAttribute

DesignSurfaceExtension

DesignSurface

IDesigner

IDesignerHost

Other Resources

Extending Design-Time Support