ControlType 复杂类型(工作项类型定义架构)
更新:2007 年 11 月
定义要在工作项窗体中显示的控件。
<xs:complexType name="ControlType">
<xs:attribute name="FieldName" type="typelib:ReferenceFieldName" use="optional" />
<xs:attribute name="Type" type="ValidControlsType" use="required" />
<xs:attribute name="Label" type="LabelType" use="optional" />
<xs:attribute name="LabelPosition" type="LabelPositionType" />
<xs:attribute name="Dock" type="DockType" use="optional" />
<xs:attribute name="Padding" type="PaddingType" use="optional" />
<xs:attribute name="Margin" type="PaddingType" use="optional" />
<xs:attribute name="ReadOnly" type="ReadOnlyType" use="optional" />
<xs:attribute name="MinimumSize" type="SizeType" use="optional" />
<xs:attribute name="Name" type="xs:string" use="optional" />
<xs:anyAttribute processContents="skip"/>
</xs:complexType>
属性和元素
下面几部分描述了属性、子元素和父元素。
属性
属性 |
说明 |
---|---|
FieldName |
可选的属性。 指定与控件关联的工作项字段。属性类型为 typelib:ReferenceFieldName。最小长度:1;最大长度:70。 模式值:^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z0-9_]+)+$ 模式值示例:公司.部门.问题类型 |
Type |
必需的属性。 指定控件的数据类型。属性类型为 ValidControlsType 简单类型(工作项类型定义架构)。有关更多信息,请参见 工作项表单控件。 |
Label |
可选的属性。 指定窗体上标识控件的可见文本。属性类型为 LabelType 简单类型(工作项类型定义架构)。最大长度:80。 |
LabelPosition |
可选的属性。 指定相对于控件数据的标签位置。属性类型为 LabelPositionType 简单类型(工作项类型定义架构)。 |
Dock |
可选的属性。 将字段与容器的指定一侧对齐,或拉伸字段以填充容器。属性类型为 DockType 简单类型(工作项类型定义架构)。 |
Padding |
可选的属性。 指定控件内部边框四周的空间大小,以像素为单位。属性类型为 PaddingType 简单类型(工作项类型定义架构)。 模式值:^\(\d+\,\d+\,\d+\,\d+\)$ 模式值示例:(2,0,2,0) |
Margin |
可选的属性。 指定控件外部边框四周的空间大小,以像素为单位。属性类型为 PaddingType 简单类型(工作项类型定义架构)。 模式值:^\(\d+\,\d+\,\d+\,\d+\)$ 模式值示例:(2,0,2,0) |
ReadOnly |
可选的属性。 指定控件数据为只读。属性类型为 ReadOnlyType 简单类型(工作项类型定义架构)。 |
MinimumSize |
可选的属性。 指定控件大小的最小值,以像素为单位。属性类型为 SizeType 简单类型(工作项类型定义架构)。 模式值:^\(\d+\,\d+\)$ 模式值示例:(100,100) |
Name |
可选的属性。 唯一标识控件。如果窗体上有多个控件与同一个工作项字段关联,则 Name 是必需的。类型为 xs:string。 |
子元素
元素 |
说明 |
---|---|
anyAttribute |
可选。 可以通过使用 anyAttribute 元素来扩展 ControlType。ProcessContents:跳过。 |
父元素
无
备注
ControlType 属于 Control 元素(工作项类型定义架构)类型。
元素信息
命名空间 |
https://schemas.microsoft.com/VisualStudio/2005/workitemtracking/typedef |
架构名称 |
工作项类型定义 |
验证文件 |
WorkItemTypeDefinition.xsd |
是否可以为空 |
不适用 |