menu element 

Specifies the list of menu items that constitutes a menu page.

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

btn element

item element

div 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 is used.

selectaction

SelectAction simple type

Optional

Defines whether selection of an item in the menu navigates to the item's specified target page, or whether it invokes the item's specified context menu. If "menuid" is specified and the item has no menuid attribute, the device will navigate to the item's specified target instead.

target: selection causes navigation to the page specified by the item's target attribute

menuid: selection causes the context menu specified by the item's menuid attribute to be invoked

Remarks

The menu element uses the MenuChild group element to specify an unbounded sequence of child elements consisting of any combination of the following child elements:

Usage Example

The following code example displays a menu on the screen of a device.

<body>
    <menu id="300" title="Today’s Appointments">
        <item target="11" imgid="1" menuid="50">10:00a-11:00a Design Meeting</item>
        <div/>
        <item target="12" imgid="1" menuid="50">11:30a-1:00p  Team Lunch</item>        <item target="13" imgid="1" menuid="50">3:00p-4:00p   Pick up kids</item>
    </menu>
</body>

Schema Definition

The following schema defines a menu page.

<xsd:simpleType name="SelectAction">
    <xsd:restriction base="xsd:string">
        <xsd:pattern value="target|menuid" />
    </xsd:restriction>
</xsd:simpleType>

<xsd:element name="menu">
    <xsd:complexType>
        <xsd:group ref="MenuChild" maxOccurs="unbounded" />
        <xsd:attribute name="id" type="xsd:positiveInteger" use="required" />
        <xsd:attribute name="title" type="xsd:string" use="optional" />
        <xsd:attribute name="selectaction" type="SelectAction" use="optional" />
    </xsd:complexType>
</xsd:element>

<xsd:group name="MenuChild">
    <xsd:choice>
        <xsd:element ref="item" minOccurs="1" />
        <xsd:element ref="div" />
        <xsd:element ref="btn" />
    </xsd:choice>
</xsd:group>

See Also

Concepts

body element
content element
dialog element
item element
div element