FormatString Element for ListItem for ListControl
Specifies a format pattern that defines how the property or script value is displayed.
Schema
- Configuration Element
- ViewDefinitions Element
- View Element
- ListControl Element
- ListEntries Element
- ListEntry Element
- ListItems Element
- ListItem Element
- FormatString Element
Syntax
<FormatString>PropertyPattern</FormatString>
Attributes and Elements
The following sections describe the attributes, child elements, and the parent element of the
FormatString
element.
Attributes
None.
Child Elements
None.
Parent Elements
Element | Description |
---|---|
ListItem Element | Defines the property or script whose value is displayed in a row of the list view. |
Text Value
Specify the pattern that is used to format the data. For example, you can use this pattern to format the value of any property that is of type System.Timespan: {0:MMM}{0:dd}{0:HH}:{0:mm}.
Remarks
Format strings can be used when creating table views, list views, wide views, or custom views. For more information about formatting a value displayed in a view, see Formatting Displayed Data.
For more information about using format strings in list views, see Creating List View.
Example
The following example shows how to define a formatting string for the value of the StartTime
property.
<ListItem>
<PropertyName>StartTime</PropertyName>
<FormatString>{0:MMM} {0:DD} {0:HH}:{0:MM}</FormatString>
</ListItem>
See Also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈