Compartilhar via


content element 

Specifies a collection of static text and images, laid out in a flow manner.

Element Information

Element type: xsd:complexType

Namespace: https://schemas.microsoft.com/sideshow/2006/scf

Schema name: Simple Content Format

Elements and Attributes

Parent Elements

body element

Child Elements

txt element

br element

img element

btn element

Attributes

Attribute

Type

Required

Description

Possible values

id

xsd:positiveInteger

Required

The content identifier of the current page.

The actual content identifier of the current page.

title

xsd:string

Optional

The title to be displayed in the title bar or at the top of the page.

Any valid string. If not specified, the gadget name will be used.

bg

xsd:positiveInteger

Optional

The content identifier of the image to be used as the background for this page. Some Windows SideShow-compatible devices may not support background images and therefore ignore this attribute.

The content identifier associated with the binary image data.

bgfit

ContentBackgroundFitMode (simple type)

Optional

Determines how the background image is laid out on the page. For more information about layout, see Remarks.

  • "s" (scale)
  • "t" (tile)
  • "c" (center)

If not specified, the default behavior is to scale the image.

menuid

xsd:positiveInteger

Optional

The content identifier of a menu page that serves as the context menu for this page.

The content identifier associated with the relevant context menu page.

Remarks

Line breaks and text alignment hints, although possibly ignored by some Windows SideShow-compatible devices, can be specified by using the br element and the align and wrap attributes of the txt element, respectively.

The ContentBackgroundFitMode simple type defines the type that contains valid values for the bgfit attribute of the content element. The valid values are "s", "t", and "c", to designate that the image should be scaled, tiled, or centered, respectively, to form the background of the page.

The content element uses the ContentChild group element to specify an unbounded sequence of child elements consisting of any combination of the child elements: txt, br, img, and btn.

Usage Example

The following code example displays typical data for a media player.

<body>
    <content id="200" title="Now Playing" bg="50" bgfit="s" menuid="1000">
        <txt align="c" wrap="0"><em>Song Title</em></txt>
        <br/>
        <txt align="c" wrap="0">Song Artist</txt>
        <br/>
        <txt align="c" wrap="0">00:00:00</txt>
        <br/>
        <img align="l" id="16" alt="[Album Cover]" />
    </content>
</body>

Schema Definition

The following schema defines a complex type with attributes that define a background, a button, and content with text and an image.

<xsd:element name="content">
    <xsd:complexType>
        <xsd:group ref="ContentChild" maxOccurs="unbounded" />
        <xsd:attribute name="id" type="xsd:positiveInteger" use="required" />
        <xsd:attribute name="title" type="xsd:string" use="optional" />
        <xsd:attribute name="bg" type="xsd:positiveInteger" use="optional" />
        <xsd:attribute name="bgfit" type="ContentBackgroundFitMode" use="optional" />
        <xsd:attribute name="menuid" type="xsd:positiveInteger" use="optional" />
    </xsd:complexType>
    <xsd:unique name="UniqueButtonKeyContent">
        <xsd:selector xpath="./btn" />
        <xsd:field xpath="@key" />
    </xsd:unique>
</xsd:element>

<xsd:group name="ContentChild">
    <xsd:choice>
        <xsd:element ref="txt" />
        <xsd:element ref="br" />
        <xsd:element ref="img" />
        <xsd:element ref="btn" />
    </xsd:choice>
</xsd:group>

See Also

Concepts

body element
menu element
dialog element
txt element
br element
img element
btn element