SecondaryTile.SecondaryTile(String, String, String, String, TileOptions, Uri) constructor

This topic has not yet been rated - Rate this topic

Creates a SecondaryTile object that includes all of the mandatory properties required to create a square tile.

Syntax


var secondaryTile = new Windows.UI.StartScreen.SecondaryTile(tileId, shortName, displayName, arguments, tileOptions, logoReference);

Parameters

tileId

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

A string that will uniquely identify the tile within your app's package. Choose a unique ID that is descriptive and meaningful to your app. It is limited to 64 characters and must begin with a number or letter and be composed of the characters a-z, A-Z, 0-9, period (.), or underscore (_). If you provide the same ID as that of an existing secondary tile, the existing secondary tile will be overwritten. Can be set or retrieved through the TileId property.

shortName

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

A short name to display directly on the tile if the app chooses to do so. Anything over 40 characters will be truncated. The user has the option to change this value as part of the pinning process. Can be set or retrieved through the ShortName property.

displayName

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

A name, generally longer than the short name, that is displayed in the tile's tooltip and when showing small tiles, such as on the Apps or search results screens. There is no restriction on the display name length or the characters that it can contain. Can be set or retrieved through the DisplayName property.

arguments

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

An app-defined string meaningful to the calling application. This argument string is passed back to the app when the app is activated from the secondary tile. It will be truncated after 2048 characters. Can be set or retrieved through the Arguments property.

tileOptions

Type: TileOptions

A value that specifies various options such as whether the name will be displayed on the secondary tile. Can be set or retrieved through the TileOptions property.

logoReference

Type: Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]

A reference to a square logo image stored at a URI. Can be set or retrieved through the Logo property. This value can be expressed using one of these schemes:

TermDescription

ms-appx:///

A path within the deployed app package. This path is resolved for languages and DPI plateau supported by the app.

ms-appdata:///local/

A file found in the per-user app storage.

 

Examples

The following example demonstrates the use of this constructor.



var uriLogo = new Windows.Foundation.Uri("ms-appx:///images/SecondaryTileDefault-sdk.png");
var currentTime = new Date();
var tileActivationArguments = "timeTileWasPinned=" + currentTime;

var tile = new Windows.UI.StartScreen.SecondaryTile("SecondaryTile.01", 
                                                    "A Secondary Tile", 
                                                    "Secondary Tile Sample Secondary Tile", 
                                                    tileActivationArguments, 
                                                    Windows.UI.StartScreen.TileOptions.showNameOnLogo, 
                                                    uriLogo);

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

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

Metadata

Windows.winmd

See also

SecondaryTile
SecondaryTile
SecondaryTile(String)
SecondaryTile(String, String, String, String, TileOptions, Uri, Uri)
Secondary tiles sample

 

 

Build date: 12/4/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.