Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Mapping Object Routing Tags to a Surface Application

Several elements must be added to a Microsoft Surface application's XML registration file to enable the object routing feature and to associate tagged objects with the application.

Typically, the application developer creates an installer for the application that automatically adds this mapping information to the application's XML registration file. However, it is important for you to understand how object routing is configured and how tags are associated with Surface applications in case you must troubleshoot issues or need to make changes after an application is installed.

Adding Object Routing to an ApplicationName.xml File

The following code example shows examples of the section that must be present in the ApplicationName.xml file for object routing tags.

...
  <Application>
...
    <Tags>
      <Tag Value="0xC0">
      <!—If only the series is set, all tags that have that series will be
       registered to launch this application.-->
        <Actions>
          <Launch /> 
        </Actions>
      </Tag>
    </Tags>
  </Application>
...

The preceding code example includes the following XML elements that must be added for object routing.

 

XML element XML syntax Description and default values

Tags

<Tags></Tags>

The Tags element is the base element that tells Surface Shell that this application wants to register and use a particular tag.

Tag

<Tag  Attribute =" AttributeValue "></Tag>

The Tag element specifies that you want to associate a tag with this application. All attributes are hexadecimal values and must match the tag attribute values that the application expects. The following table lists the default values for each attribute. If an attribute is not set, Surface will assume the default value for it.

 

Attribute Default value

Series

"0x0"

Value

"*"

Schema

"0x0"

ExtendedValue

"0x0"

Actions

<Actions></Actions>

(Optional). The Actions element specifies the actions to associate with the tags. Include this element inside the Tag element that you want to associate the specified action with.

Include the Actions element only if you also include the <Launch /> syntax.

noteNote
For this release of Surface, <Launch /> is the only valid syntax that you can include in the Actions element.

Launch

<Launch />

The Launch element specifies that the application will use object routing with the tag where this element appears. This means that Surface will display an object routing menu when an object with the specified tag is placed on the device's screen while in Surface mode.

Did you find this information useful? Please send us your suggestions and comments.

© 2011 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.