Layout XML Element Reference
You can use the Layout element to define how the elements on the work item form appear. You can define more than one layout to support different clients, such as the Windows client for Visual Studio or the web client for Team Web Access.
The Layout element is a required child element of the FORM element. For more information about how to use the Layout element, see Designing the Layout of the Work Item Form.
Schema Hierarchy
Layout
<xs:element name="Layout" type="LayoutType" minOccurs="1" maxOccurs="unbounded"/>
<Layout Target="ClientName" MinimumSize="(width,height)" Padding="(left, top, right, bottom)"
Margin="(left, top, right, bottom)" ControlSpacing="distance" LabelSpacing="distance">
<Group> . . . </Group>
<Control> . . . </Control>
<TabGroup> . . . </TabGroup>
<Splitter> . . . </Splitter>
</Layout >
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute |
Description |
---|---|
Target |
Optional LayoutType attribute. Specifies the name of the client to which the layout applies. The type is xs:string. Specify one of the following strings:
|
MinimumSize |
Optional LayoutType attribute. Specifies the minimum size in pixels for the form. The syntax is specified in (width, height). The attribute type is SizeType. Pattern value: ^\(\d+\,\d+\)$ Pattern value example: (100,100) |
Padding |
Optional LayoutType attribute. Specifies the amount of space in pixels around the inside border of the form. The attribute type is SizeType. Pattern value: ^\(\d+\,\d+\,\d+\,\d+\)$ Pattern value example: (2,0,2,0) |
Margin |
Optional LayoutType attribute. Specifies the amount of space in pixels around the outside border of the form. The attribute type is SizeType. Pattern value: ^\(\d+\,\d+\,\d+\,\d+\)$ Pattern value example: (2,0,2,0) |
ControlSpacing |
Optional LayoutType attribute. Specifies the vertical offset of controls defined in the form. The type is xs:integer. |
LabelSpacing |
Optional LayoutType attribute. Specifies the number of pixels between the label and the edit region of the control. The type is xs:integer. |
Child Elements
Element |
Description |
---|---|
Optional. Defines a group of elements to display together on the form. |
|
Optional. Defines a work item field, text, hyperlink, or other control element to display in a work item form. |
|
Optional. Contains one or more Tab elements. |
|
Optional. Defines a splitter and its orientation on the form between sibling form elements. |
Parent Elements
Element |
Description |
---|---|
Required. Contains the Layout element that defines how the elements on the work item type form are displayed. |
Remarks
The Layout element is a required child element of FORM. The Layout element specifies a choice, and at least one of the child elements must be defined: Group, Control, TabGroup, or Splitter. You can define more than one child element.
minOccurs="1"
maxOccurs="unbounded"
Example
<FORM>
<Layout>
<Group>
<Column PercentWidth="36">
<Group>
<Control FieldName="System.Title" Type="FieldControl" Label="Title" LabelPosition="Left" />
<Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="Area" LabelPosition="Left" />
<Control FieldName="Microsoft.VSTS.Common.ProductUnit" Type="FieldControl" Label="Product Unit" LabelPosition="Left" />
<Control FieldName="Microsoft.DevDiv.BusinessUnit" Type="FieldControl" Label="Business Unit" LabelPosition="Left" />
</Group>
</Column>
<Column PercentWidth="33">
<Group>
<Control FieldName="Microsoft.DevDiv.SubTitle" Type="FieldControl" Label="Sub Title" LabelPosition="Left" />
<Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="Iteration" LabelPosition="Left" />
<Control FieldName="Microsoft.DevDiv.Other" Type="FieldControl" Label="Other" LabelPosition="Left" />
</Group>
</Column>
<Column PercentWidth="31">
<Group>
<Control FieldName="Microsoft.DevDiv.Type" Type="FieldControl" Label="Type" LabelPosition="Left" />
<Control FieldName="System.AssignedTo" Type="FieldControl" Label="Assigned To" LabelPosition="Left" />
<Control FieldName="System.State" Type="FieldControl" Label="State" LabelPosition="Left" />
</Group>
</Column>
</Group>
. . .
</Layout>
</FORM>
Element Information
Namespace |
https://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef |
Schema Name |
Work Item Type Definition |
Validation File |
WorkItemTypeDefinition.xsd |
Element Type |
LayoutType Complex Type |
Can Be Empty |
No |