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.
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
System.Attribute
Microsoft.VisualStudio.Shell.RegistrationAttribute
Microsoft.VisualStudio.Shell.Design.DesignSurfaceExtensionAttribute
| Name | Description | |
|---|---|---|
![]() | DesignSurfaceExtensionAttribute(Type) | Creates a new instance of the DesignSurfaceExtensionAttribute class specifying a given object as providing a VSPackage's implementation of DesignSurfaceExtension. |
| Name | Description | |
|---|---|---|
![]() | ExtensionType | The Type of the object registered as providing a VSPackage with an implementation of DesignSurfaceExtension to customize design surfaces. |
![]() | LoadAtIdle | 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. |
![]() | TypeId | Gets the current instance of this attribute.(Inherited from RegistrationAttribute.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | (Inherited from Attribute.) |
![]() | GetHashCode() | (Inherited from Attribute.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IsDefaultAttribute() | (Inherited from Attribute.) |
![]() | Match(Object) | (Inherited from Attribute.) |
![]() | Register(RegistrationAttribute.RegistrationContext) | Registers the design surface extension.(Overrides RegistrationAttribute.Register(RegistrationAttribute.RegistrationContext).) |
![]() | ToString() | (Inherited from Object.) |
![]() | Unregister(RegistrationAttribute.RegistrationContext) | Removes the design surface extension registry key.(Overrides RegistrationAttribute.Unregister(RegistrationAttribute.RegistrationContext).) |
| Name | Description | |
|---|---|---|
![]() ![]() | _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.GetTypeInfoCount(UInt32) | (Inherited from Attribute.) |
![]() ![]() | _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (Inherited from Attribute.) |
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.



