Add the Attachments Control
If you are designing a work item form from the ground up, you may want to add the control to attach files to the work item. In general, each work item form contains a tab that supports the attachment of files, such as an e-mail thread, a document, an image, a log file, or another type of file.
You use the Control element AttachmentsControl Type attribute to enable users to see and manage the file attachments of a work item. By adding this control to a work item form, you can open, add, and remove file attachments. In the following example, a tab that is labeled "Attachments" is added to a work item form by using all the controls that are shown.
<Tab Label="Attachments"> <Control Type="AttachmentsControl" LabelPosition="Top" /> </Tab>
You must click or attach a file before the buttons to open an attachment (), save a copy ( Save Copy), and delete an attachment () become available. For more information, see Attachment Controls and Field Reference.
You can control the spacing and size of the attachment control by specifying the attributes in the following table.
Pattern value example
Optional. String of the form (Width, Height). This value specifies the minimum size for the form itself. When the container control is smaller than this size, horizontal and vertical scrollbars appear.
Optional. String of the form (left, top, right, bottom) that specifies, in pixels, the amount of space around the control and between the control and its neighbors. You can vary the amount of space on each side.
Optional. String of the form (left, top, right, bottom) that specifies, in pixels, the amount of space around the outside border of the control and around the inside border. You can vary the amount of space on each side.
Optional. Specifies the visible text on the form that identifies the control.
You can leave the label unspecified when the attachment control is the only control on a tab. The tab label is sufficient to identify the control.
Specify a string of no more than 80 characters.