ProvideToolboxFormatAttribute::Format Property
Visual Studio 2015
Gets the name of a supported clipboard format.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
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);
}
}
}
Show: