Work Item Form Controls

You can place controls in a work item form to display fields and other information about a work item. To define a control, use a CONTROL element. Each CONTROL element has a Type attribute and optional label attributes.

Use the Label attribute to specify the text that displays next to the control. Use the related LabelPosition attribute to specify where the label appears relative to the control.

Use the Type attribute to specify one of the following control types.

  • FieldControl

  • TFStructureControl

  • WorkItemLogControl

  • LinksControl

  • AttachmentsControl

  • HtmlFieldControl

HtmlFieldControl

Use this control for fields of the HTML type. This control can display formatted text over multiple lines.

<Control Type="HtmlFieldControl" FieldName="Microsoft.VSTS.ReproSteps"
  Label="Repro Steps" LabelPosition="Top" Dock="Left"
  MinimumSize="100,500" />

FieldControl

Use this control to display a field on a work item form. The field control must refer to a field by its reference name.

<Control Type="FieldControl" FieldName="System.Title"
  Label="Title" LabelPosition="Left" />

TFStructureControl

Use this control to display the area path and iteration path fields in a tree format. The tree shows hierarchical nodes that a user can expand and collapse.

<Control Type="TFStructureControl" FieldName="System.AreaPath"
  Label="Area" LabelPosition="Left" />

WorkItemLogControl

Use this control to enable users to see the work item's history field. By using this control, users can expand and collapse details about historical revisions to the work item.

<Control Type="WorkItemLogControl" FieldName="System.History"
  Label="Detailed Description and History"
  LabelPosition="Top" Dock="Fill" />

LinksControl

Use this control to enable users to see and manage links from this work item to other items such as other work items. By using this control, users can open, edit, add, and remove links.

<Control Type="LinksControl" />

AttachmentsControl

Use this control to enable users to see and manage a work item's file attachments. By using this control, users can open, add, and remove file attachments.

<Control Type="AttachmentsControl" />

See Also

Concepts

Work Item Form Sample