Control 元素(工作项类型定义架构)

更新:2007 年 11 月

定义要在窗体中显示的控件。

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

属性和元素

下面几部分描述了属性、子元素和父元素。

属性

属性

说明

FieldName

可选的 ControlType 属性。

指定与控件关联的工作项字段。

Type

必需的 ControlType 属性。

指定控件的数据类型。有效的内置类型为 FieldControl、DateTimeControl、HtmlFieldControl、LinksControl、AttachmentControl、WorkItemClassificationControl 以及 WorkItemLogControl。有关更多信息,请参见工作项表单控件

可以通过将 Type 属性设置为自定义值来使用自定义控件。任何 Type 值与内置类型的名称不匹配的控件都被视为自定义控件。

Label

可选的 ControlType 属性。

指定窗体上标识控件的可见文本。

LabelPosition

可选的 ControlType 属性。

指定相对于控件数据的标签位置。

Dock

可选的 ControlType 属性。

将字段与容器的指定一侧对齐,或拉伸字段以填充容器。

Padding

可选的 ControlType 属性。

指定控件内部边框四周的空间大小,以像素为单位。

Margin

可选的 ControlType 属性。

指定控件外部边框四周的空间大小,以像素为单位。

ReadOnly

可选的 ControlType 属性。

指定该字段为只读。

MinimumSize

可选的属性。

指定控件大小的最小值,以像素为单位。属性类型为 SizeType。

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

Name

可选的属性。

唯一标识控件。如果窗体上有多个控件与同一个工作项字段关联,则 Name 是必需的。

子元素

元素

说明

anyAttribute

可选。

可以通过使用 anyAttribute 元素来扩展 ControlType。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> 元素