Control Element (Work Item Type Definition Schema)

Defines a field that is to appear on the form.

<Control FieldName="control 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" />

Attributes and Elements

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

Attributes

Attribute Description

FieldName

Optional ControlType attribute.

The name of the field.

Type

Required ControlType attribute.

The type of the control. Valid built-in types are FieldControl, DateTimeControl, HtmlFieldControl, LinksControl, AttachmentControl, WorkItemClassificationControl, and WorkItemLogControl. For more information, see 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. For more information, see the topic "Work Item Tracking Custom Controls" in the Community Technical Preview that was released in December 2006 for Visual Studio SDK 4.0.

Label

Optional ControlType attribute.

The label for the field.

LabelPosition

Optional ControlType attribute.

The position of the label relative to the field data.

Dock

Optional ControlType attribute.

Stretches the field to fill the container.

Padding

Optional ControlType attribute.

The amount of space around the inside border of the control.

Margin

Optional ControlType attribute.

The amount of space around the outside border of the control.

ReadOnly

Optional ControlType attribute.

Specifies that the field is read-only.

Child Elements

None.

Parent Elements

Element Description

Layout

Required element.

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

Column

Required element.

Defines columns for the form.

Tab

Required element.

Defines a tab for the form.

Remarks

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

Element Information

Namespace

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

Schema Name

Work Item Type Definition

Validation File

WorkItemTypeDefinition.xsd

Element Type

ControlType

Can Be Empty

Not applicable

See Also

Reference

Layout Element (Work Item Type Definition Schema)
Column Element (Work Item Type Definition Schema)
Tab Element (Work Item Type Definition Schema)

Concepts

All Work Item <FORM> Elements