Export (0) Print
Expand All

numberFormat

Specifies how IPropertyDescription::FormatForDisplay should format the property's value as a string. This is applicable only if <displayInfo displayType="Number">. 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 ElementChild Elements
displayInfo None

 

Attributes

AttributeDescription
formatAsPublic. Optional. Default is "General". Specifies the display format. The following are valid values.
ValueMeaning
GeneralDefault. Displays the value as an unformatted number.
PercentageFormats the value as a percentage. Requires the property to be UInt32.
ByteSizeFormats the value as a byte, "KB", "MB", or "GB" as appropriate. Requires the property to be UInt64.
KBSizeFormats the value as a "KB", no matter what the value is. Requires the property to be UInt64.
SampleSizeFormats the value as a number of bits. Requires the property to be UInt32.
BitRateFormats the value in "Kbps". Requires the property to be UInt32. The value must be stored in "bits-per-second" units.
SampleRateFormats the value in "KHz". Requires the property to be UInt32. The value must be stored in "Hertz" units.
FrameRateFormats the value in frames/second. Requires the property to be UInt32. The value must be stored in "kilo-frames-per-second" units.
PixelsFormats the value in pixel units. Requires the property to be UInt32.
DPIFormats the value in dots-per-inch. Requires the property to be UInt32.
DurationFormats the value as a duration. Use <formatDurationAs> to specify the duration format. Requires the property to be UInt64.

 

formatDurationAsPublic. Optional. Default is "hh:mm:ss". Only applies if formatAs="Duration". Requires the property to be UInt64. The following are valid values.
ValueMeaning
hh:mmFormats the value in hours and minutes.
hh:mm:ssDefault. Formats the value in hours, minutes, and seconds.
hh:mm:ss.fffFormats the value in hours, minutes, seconds, and milliseconds.

 

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft