Control Element (Work Item Type Definition Schema)

Defines a control that is to appear on the form.

<xs:element name="Control" type="ControlType" minOccurs="0"/>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

FieldName

Optional ControlType attribute.

Specifies the work item field with which the control is associated.

Type

Required ControlType attribute.

Specifies the data type of the control. Valid built-in types are FieldControl, DateTimeControl, HtmlFieldControl, LinksControl, AttachmentControl, WorkItemClassificationControl, and WorkItemLogControl. For more information, see Specifying Work Item Form Controls.

You can use a custom control by setting the Type attribute to a custom value. Any control whose Type value does not match the name of a built-in type is considered a custom control.

Label

Optional ControlType attribute.

Specifies the visible text on the form that identifies the control.

LabelPosition

Optional ControlType attribute.

Specifies the position of the label relative to the control data.

Dock

Optional ControlType attribute.

Aligns the field with the specified side of the container, or stretches the field to fill the container.

Padding

Optional ControlType attribute.

Specifies the amount of space in pixels around the inside border of the control.

Margin

Optional ControlType attribute.

Specifies the amount of space in pixels around the outside border of the control.

ReadOnly

Optional ControlType attribute.

Specifies that the field is read-only.

MinimumSize

Optional attribute.

Specifies the minimum size in pixels that the control can be. The attribute type is SizeType.

Pattern value: ^\(\d+\,\d+\)$

Name

Optional attribute.

Identifies a control uniquely. Name is essential if more than one control on the form is associated with the same work item field.

Child Elements

Element

Description

anyAttribute

Optional element.

ControlType is extensible through use of the anyAttribute element. ProcessContents: skip.

Parent Elements

Element

Description

Layout Element (Work Item Type Definition Schema)

Required element.

Defines how to display the elements on the work item form.

Column Element (Work Item Type Definition Schema)

Required element.

Defines columns for the form.

Tab Element (Work Item Type Definition Schema)

Required element.

Defines a tab for the form.

Remarks

Control is an optional child element of Layout, Column, and Tab.

Layout and Column Indicators:

minOccurs = "0"

maxOccurs = "1"

Tab Indicators:

minOccurs = "0"

maxOccurs = "unbounded"

Example

<Control FieldName="work item field name" Type="control type" Label="label text" LabelPosition="Top | Bottom | Left | Right" Dock="Fill | Top | Bottom | Left | Right" Padding="(left, top, right, bottom)" Margin="(left, top, right, bottom)" ReadOnly="True | False" MinimumSize="(width,height)" Name="control name" />

Element Information

Namespace

https://schemas.microsoft.com/VisualStudio/2005/workitemtracking/typedef

Schema Name

Work Item Type Definition

Validation File

WorkItemTypeDefinition.xsd

Element Type

ControlType Complex Type (Work Item Type Definition Schema)

Can Be Empty

Not applicable

See Also

Concepts

All Work Item FORM Elements