共用方式為


Control 項目 (工作項目類型定義結構描述)

更新:2007 年 11 月

定義要顯示在表單上的控制項。

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

屬性和項目

下列章節會說明屬性 (Attribute)、子項目和父項目。

屬性

屬性

描述

FieldName

選擇性的 ControlType 屬性 (Attribute)。

指定與控制項相關聯的工作項目欄位。

Type

必要 ControlType 屬性。

指定控制項的資料型別。有效的內建型別為 FieldControl、DateTimeControl、HtmlFieldControl、LinksControl、AttachmentControl、WorkItemClassificationControl 和 WorkItemLogControl。如需詳細資訊,請參閱工作項目表單控制項

藉由將 Type 屬性設定為某個自訂值,即可使用自訂控制項。任何具有 Type 值的控制項,只要其與內建類型的名稱不相符,即可視為自訂控制項。

Label

選擇性的 ControlType 屬性 (Attribute)。

指定表單上可識別控制項的可見文字。

LabelPosition

選擇性的 ControlType 屬性 (Attribute)。

指定標籤相對於控制項資料的位置。

Dock

選擇性的 ControlType 屬性 (Attribute)。

將欄位與容器指定的一邊對齊,或讓欄位延伸以填滿容器。

Padding

選擇性的 ControlType 屬性 (Attribute)。

指定控制項內側框線周圍的空間,以像素為單位。

Margin

選擇性的 ControlType 屬性 (Attribute)。

指定控制項外側框線周圍的空間,以像素為單位。

ReadOnly

選擇性的 ControlType 屬性 (Attribute)。

指定欄位是唯讀的。

MinimumSize

選擇性屬性。

指定控制項的最小大小,以像素為單位。屬性型別為 SizeType。

模式值:^\(\d+\,\d+\)$

Name

選擇性屬性。

唯一識別控制項。如果表單上有一個以上的控制項與同一工作項目欄位相關聯,Name 即為必要。

子項目

項目

說明

anyAttribute

選擇性項目。

ControlType 可透過使用 anyAttribute 項目擴充。ProcessContents:略過。

父項目

項目

說明

Layout 項目 (工作項目類型定義結構描述)

必要項目。

定義如何在工作項目表單上顯示項目。

Column 項目 (工作項目類型定義結構描述)

必要項目。

定義表單的資料行。

Tab 項目 (工作項目類型定義結構描述)

必要項目。

定義表單的標籤。

備註

Control 是 Layout、Column 和 Tab 的選擇性子項目。

Layout 和 Column 指標:

minOccurs = "0"

maxOccurs = "1"

Tab 指標:

minOccurs = "0"

maxOccurs = "unbounded"

範例

<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" />

項目資訊

命名空間

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

結構描述名稱

工作項目類型定義

驗證檔

WorkItemTypeDefinition.xsd

項目型別

ControlType 複雜型別 (工作項目類型定義結構描述)

可以是空白

不適用

請參閱

概念

所有工作項目 <FORM> 項目