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.

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

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


XML element XML syntax Description and default values



The Tags element is the base element that tells Surface Shell that this application wants to register and use a particular 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











(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.

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


<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.