Partager via


ProvideToolboxFormatAttribute(String) Constructor

Definition

Initializes a new instance of ProvideToolboxFormatAttribute for the specified format.

public:
 ProvideToolboxFormatAttribute(System::String ^ format);
public:
 ProvideToolboxFormatAttribute(Platform::String ^ format);
 ProvideToolboxFormatAttribute(std::wstring const & format);
public ProvideToolboxFormatAttribute (string format);
new Microsoft.VisualStudio.Shell.ProvideToolboxFormatAttribute : string -> Microsoft.VisualStudio.Shell.ProvideToolboxFormatAttribute
Public Sub New (format As String)

Parameters

format
String

The name of a supported format.

Exceptions

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  

Applies to