您的位置:首页 > 其它

控制TFS工作项布局、格式的属性(微软没有提供相应文档)

2008-12-02 15:21 501 查看
最近,为了将TFS工作项与CMMI文档统一起来,需要将TFS中的工作项进行自定义。发现没有定义日期型控件格式的属性,通过查找,发现了以下博客中有记载:

Undocumented attributes for controlling the Work Item form layout

主要有关工作项布局、格式的属性为:


<Control FieldName="control name" Type="FieldControl | DateTimeControl | HtmlFieldControl | LinksControl | AttachmentsControl | WorkItemClassificationControl | WorkItemLogControl" 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 that weren’t documented:

MinimumSize: The minimum size the control should occupy in the form. If vertical space is not enough, then a scrollbar is shown to keep its minimum size. Without this attribute, the controls are drawn with their default sizes (unless controls in other tabs take larger space that incrasing whole tab’s size). The syntax for it's value is "(width,height)" (In regex format it is "^"("d+","d+")$").

Name: If you want to add same field to be displayed in more than one place, it is possible but the Name attribute should be set to unique values for both – so that the system identifies each control uniquely. It is useful to show same control in various places based on context of tabs.

[Update: 3/12/07]

Below are special attributes available for specific controls:

NumberFormat (for FieldControl only): Useful if a number value is displayed in the field. Possible values: WholeNumbers, SignedWholeNumbers, DecimalNumbers, SignedDecimalNumbers. Setting this attribute determines what characters are allowed to be entered in this control.

MaxLength (for FieldControl only): Maximum length of allowed characters for field control in form UI.

Format (for DateTimeControl only): One of values of DateTimePickerFormat enum. Possible values as given in help are: Long, Short, Time and Custom. Custom format can be set by having 'Custom' as value for this attribute, and setting another attribute named CustomFormat with actual custom format string.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐