DesignSurfaceExtensionAttribute Class

 

Notifies the Visual Studio environment that a VSPackage provides a Type implementing a service to customize or extend services provided by any implementation of DesignSurface at designer load time.

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

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.Design.DesignSurfaceExtensionAttribute

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, 
	Inherited = true)]
public sealed class DesignSurfaceExtensionAttribute : RegistrationAttribute

NameDescription
System_CAPS_pubmethodDesignSurfaceExtensionAttribute(Type)

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

NameDescription
System_CAPS_pubpropertyExtensionType

The Type of the object registered as providing a VSPackage with an implementation of DesignSurfaceExtension to customize design surfaces.

System_CAPS_pubpropertyLoadAtIdle

Controls when, relative to the loading of a designer used by a VSPackage, the extensions provided by the implementation of the DesignSurfaceExtensionAttribute registered by DesignSurfaceExtensionAttribute are installed.

System_CAPS_pubpropertyTypeId

Gets the current instance of this attribute.(Inherited from RegistrationAttribute.)

Applies to

Classes providing VSPackages by implementing the IVsPackage interface or the Package interface.

Repeatable

No

Required attributes

An instance each of ProvideObjectAttribute and ProvideServiceAttribute constructed with the Type of the class registered by the DesignSurfaceExtensionAttribute as implementing the DesignSurfaceExtension.

Invalid attributes

None

This Attribute specifies a Type as implementing a service providing customization or extension of the services provided by any implementation of DesignSurface used by the VSPackage.

DesignSurfaceExtensionAttribute is only used for registration purposes and does not affect how code behaves at runtime.

Instances of this Attribute should only be applied to classes implementing Package for a VSPackage.

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 

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: