다음을 통해 공유


ProvideToolboxFormatAttribute Constructor

Initializes a new instance of ProvideToolboxFormatAttribute for the specified format.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

‘선언
Public Sub New ( _
    format As String _
)
‘사용 방법
Dim format As String

Dim instance As New ProvideToolboxFormatAttribute(format)
public ProvideToolboxFormatAttribute(
    string format
)
public:
ProvideToolboxFormatAttribute(
    String^ format
)
new : 
        format:string -> ProvideToolboxFormatAttribute
public function ProvideToolboxFormatAttribute(
    format : String
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

Thrown if the format argument is null.

Examples

In the example below the attributes applied to the class MyPackage indicate that the package supports version 1 of Toolbox items of with two clipboard formats: "CF_XMLCODE" and "InPlaceMenuEditorMenu".

    [DefaultRegistryRoot("Software\\Microsoft\\VisualStudio\\8.0")]
    [ProvideToolboxItems(true, 1)]
    [ProvideToolboxFormat("CF_XMLCODE")]
    [ProvideToolboxFormat("InPlaceMenuEditorMenu")]
    [Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")]
    internal sealed class MyPackage : Package

.NET Framework Security

See Also

Reference

ProvideToolboxFormatAttribute Class

ProvideToolboxFormatAttribute Members

Microsoft.VisualStudio.Shell Namespace

ProvideToolboxFormatAttribute

ProvideToolboxItemsAttribute

Other Resources

Toolbox (Visual Studio SDK)