Share via


ProvideToolboxFormatAttribute.Format Property

Definition

Gets the name of a supported clipboard format.

public:
 property System::String ^ Format { System::String ^ get(); };
public:
 property Platform::String ^ Format { Platform::String ^ get(); };
public string Format { get; }
member this.Format : string
Public ReadOnly Property Format As String

Property Value

The name of the clipboard format.

Examples

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);  
                   }  
     }  

}

Remarks

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.

Applies to