ProvideToolboxFormatAttribute::Format Property

 

Gets the name of a supported clipboard format.

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

public:
property String^ Format {
	String^ get();
}

Property Value

Type: System::String^

The name of the clipboard format.

This property is set in the constructor. It must be applied together with the ProvideToolboxItemsAttribute attribute to register a VSPackage's support for specific clipboard formats.

In the example below, a list of the ProvideToolboxFormatAttribute attributes applied to the VSPackage is obtained and the format values are written to standard output.

public  void PrintFormats(RegistrationContext context) {
    foreach(ProvideToolboxFormatAttribute pfa in 
            context.ComponentType.GetCustomAttributes(typeof(ProvideToolboxFormatAttribute), true)) {
                if (format.Length != 0) {
                    System.Console.WriteLine(pfa.Format);
                   }
     }

}

Return to top
Show: