TileUpdateManager.GetTemplateContent | getTemplateContent method

Applies to Windows and Windows Phone

Gets the XML content of one of the predefined tile templates so that you can customize it for a tile update.

Note  When this method is called on a Windows 8 system, it returns a version 1 template. When this method is called on a Windows 8.1 system, it returns a version 2 template. However, if an app specifies Windows 8 compatibility in its manifest, this method returns a version 1 template.

Syntax


var xmlDocument = Windows.UI.Notifications.TileUpdateManager.getTemplateContent(type);

Parameters

type

Type: TileTemplateType

The name of the template.

Return value

Type: XmlDocument

The object that contains the XML.

Remarks

You can use Document Object Model (DOM) manipulation functions to customize the template content for use in a TileNotification update that you will send to the tile through the TileUpdater that you create through the other methods of this class.

See tile schema for an explanation of tile elements and attributes.

Examples

The following example shows GetTemplateContent used to retrieve the XML content of a tile template.



var tileTemplate = Windows.UI.Notifications.TileTemplateType.tileWide310x150Text03;
var tileXml = Windows.UI.Notifications.TileUpdateManager.getTemplateContent(tileTemplate);

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.UI.Notifications
Windows::UI::Notifications [C++]

Metadata

Windows.winmd

See also

TileUpdateManager
App tiles and badges sample
Quickstart: Sending a tile update
Tile and tile notification overview
The tile template catalog
Guidelines and checklist for tiles
How to schedule a tile notification
How to set up periodic notifications for tiles
Tiles XML schema

 

 

Show:
© 2014 Microsoft