numberFormat

Specifies how IPropertyDescription::FormatForDisplay should format the property's value as a string. This is applicable only if . There should be only one numberFormat element for each displayInfo element.

If there are multiple elements, the last one is used. If no numberFormat element is provided, then the default attribute settings are applied to the property description.

Syntax

      <!-- numberFormat -->
      <xs:element name="numberFormat"  minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:attribute name="formatAs">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="General"/>
                <xs:enumeration value="Percentage"/>
                <xs:enumeration value="ByteSize"/>
                <xs:enumeration value="KBSize"/>
                <xs:enumeration value="SampleSize"/>
                <xs:enumeration value="Bitrate"/>
                <xs:enumeration value="SampleRate"/>
                <xs:enumeration value="FrameRate"/>
                <xs:enumeration value="Pixels"/>
                <xs:enumeration value="DPI"/>
                <xs:enumeration value="Duration"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="formatDurationAs">
              <xs:restriction base="xs:string">
                <xs:enumeration value="hh:mm"/>
                <xs:enumeration value="hh:mm:ss"/>
                <xs:enumeration value="hh:mm:ss.fff"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>

Element Information

Parent Element Child Elements
displayInfo None

 

Attributes

Attribute Description
formatAs Public. Optional. Default is "General". Specifies the display format. The following are valid values.
Value Meaning
General Default. Displays the value as an unformatted number.
Percentage Formats the value as a percentage. Requires the property to be UInt32.
ByteSize Formats the value as a byte, "KB", "MB", or "GB" as appropriate. Requires the property to be UInt64.
KBSize Formats the value as a "KB", no matter what the value is. Requires the property to be UInt64.
SampleSize Formats the value as a number of bits. Requires the property to be UInt32.
BitRate Formats the value in "Kbps". Requires the property to be UInt32. The value must be stored in "bits-per-second" units.
SampleRate Formats the value in "KHz". Requires the property to be UInt32. The value must be stored in "Hertz" units.
FrameRate Formats the value in frames/second. Requires the property to be UInt32. The value must be stored in "kilo-frames-per-second" units.
Pixels Formats the value in pixel units. Requires the property to be UInt32.
DPI Formats the value in dots-per-inch. Requires the property to be UInt32.
Duration Formats the value as a duration. Use to specify the duration format. Requires the property to be UInt64.

 

formatDurationAs Public. Optional. Default is "hh:mm:ss". Only applies if formatAs="Duration". Requires the property to be UInt64. The following are valid values.
Value Meaning
hh:mm Formats the value in hours and minutes.
hh:mm:ss Default. Formats the value in hours, minutes, and seconds.
hh:mm:ss.fff Formats the value in hours, minutes, seconds, and milliseconds.