SecondaryTile SecondaryTile SecondaryTile SecondaryTile SecondaryTile Constructors

Definition

Overloads

SecondaryTile() SecondaryTile() SecondaryTile() SecondaryTile() SecondaryTile()

Creates a SecondaryTile object. The caller must then set any mandatory properties through the object before attempting to pin, update, or delete the tile.

SecondaryTile(String) SecondaryTile(String) SecondaryTile(String) SecondaryTile(String) SecondaryTile(String)

Creates a SecondaryTile object with a specific ID. This form of the constructor should be used to create a secondary tile object to perform a tile update or deletion.

SecondaryTile(String, String, String, String, TileOptions, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri)

Note

This constructor may be altered or unavailable for releases after Windows 8.1. Instead, use SecondaryTile.SecondaryTile(String, String, String, Uri, TileSize).

Creates a SecondaryTile object as a medium tile.

SecondaryTile(String, String, String, String, TileOptions, Uri, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri, Uri)

Note

This constructor may be altered or unavailable for releases after Windows 8.1. Instead, use SecondaryTile.SecondaryTile(String, String, String, Uri, TileSize) and supply other tile sizes and options through SecondaryTile.VisualElements method.

Creates a SecondaryTile object as a wide tile.

On Windows Phone 8.1, all tiles— including secondary tiles— are pinned at as medium tiles, after which they can be resized by the user. This constructor provides that option of resizing to a wide tile.

SecondaryTile(String, String, String, Uri, TileSize) SecondaryTile(String, String, String, Uri, TileSize) SecondaryTile(String, String, String, Uri, TileSize) SecondaryTile(String, String, String, Uri, TileSize) SecondaryTile(String, String, String, Uri, TileSize)

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

SecondaryTile() SecondaryTile() SecondaryTile() SecondaryTile() SecondaryTile()

Creates a SecondaryTile object. The caller must then set any mandatory properties through the object before attempting to pin, update, or delete the tile.

public : SecondaryTile()
SecondaryTile() const;
public SecondaryTile()
Public Sub New()
var secondaryTile = new secondaryTile();

Remarks

Mandatory tile properties, such as the display name, must be set through calls to other methods of this class before the tile can be activated.

To use this object from a desktop app, create the object, and then use the IInitializeWithWindow::Initialize method to associate the object with a window handle.

SecondaryTile(String) SecondaryTile(String) SecondaryTile(String) SecondaryTile(String) SecondaryTile(String)

Creates a SecondaryTile object with a specific ID. This form of the constructor should be used to create a secondary tile object to perform a tile update or deletion.

public : SecondaryTile(Platform::String tileId)
SecondaryTile(winrt::hstring tileId) const;
public SecondaryTile(String tileId)
Public Sub New(tileId As String)
var secondaryTile = new secondaryTile(tileId);

Parameters

tileId
String String String

A string that will uniquely identify the tile within your app. Choose a unique ID that is descriptive and meaningful to your app. If you provide the same ID as that of an existing secondary tile, the existing secondary tile will be overwritten.

Remarks

The unique ID that you use to create this tile can be used later update or delete it.

Other mandatory tile properties, such as the display name, must be set through calls to other methods of this class before the tile can be activated.

To use this object from a desktop app, create the object, and then use the IInitializeWithWindow::Initialize method to associate the object with a window handle.

SecondaryTile(String, String, String, String, TileOptions, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri)

Note

This constructor may be altered or unavailable for releases after Windows 8.1. Instead, use SecondaryTile.SecondaryTile(String, String, String, Uri, TileSize).

Creates a SecondaryTile object as a medium tile.

public : SecondaryTile(Platform::String tileId, Platform::String shortName, Platform::String displayName, Platform::String arguments, TileOptions tileOptions, Uri logoReference)
SecondaryTile(winrt::hstring tileId, winrt::hstring shortName, winrt::hstring displayName, winrt::hstring arguments, TileOptions tileOptions, Uri logoReference) const;
public SecondaryTile(String tileId, String shortName, String displayName, String arguments, TileOptions tileOptions, Uri logoReference)
Public Sub New(tileId As String, shortName As String, displayName As String, arguments As String, tileOptions As TileOptions, logoReference As Uri)
var secondaryTile = new secondaryTile(tileId, shortName, displayName, arguments, tileOptions, logoReference);

Parameters

tileId
String String String

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

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.

Note

This value is only used in Windows 8 and is deprecated in favor of the displayName in later versions.

displayName
String String String

A name to be displayed on the tile, in the tile's tooltip, and when showing small tiles, such as on the Apps or search results screens. This string is equivalent to the display name given in the manifest for the main tile. It is restricted to 256 characters, but in practice should be kept short to avoid truncation. This value can be set or retrieved through the DisplayName property.

The display name is shown only on the wide secondary tile on Windows Phone 8.1.

arguments
String String String

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
TileOptions TileOptions 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
Uri Uri Uri

A reference to a square logo image stored at a Uniform Resource Identifier (URI). Can be set or retrieved through the Logo property. This value can be expressed using one of these schemes: 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.

Remarks

To use this object from a desktop app, create the object, and then use the IInitializeWithWindow::Initialize method to associate the object with a window handle.

SecondaryTile(String, String, String, String, TileOptions, Uri, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri, Uri) SecondaryTile(String, String, String, String, TileOptions, Uri, Uri)

Note

This constructor may be altered or unavailable for releases after Windows 8.1. Instead, use SecondaryTile.SecondaryTile(String, String, String, Uri, TileSize) and supply other tile sizes and options through SecondaryTile.VisualElements method.

Creates a SecondaryTile object as a wide tile.

On Windows Phone 8.1, all tiles— including secondary tiles— are pinned at as medium tiles, after which they can be resized by the user. This constructor provides that option of resizing to a wide tile.

public : SecondaryTile(Platform::String tileId, Platform::String shortName, Platform::String displayName, Platform::String arguments, TileOptions tileOptions, Uri logoReference, Uri wideLogoReference)
SecondaryTile(winrt::hstring tileId, winrt::hstring shortName, winrt::hstring displayName, winrt::hstring arguments, TileOptions tileOptions, Uri logoReference, Uri wideLogoReference) const;
public SecondaryTile(String tileId, String shortName, String displayName, String arguments, TileOptions tileOptions, Uri logoReference, Uri wideLogoReference)
Public Sub New(tileId As String, shortName As String, displayName As String, arguments As String, tileOptions As TileOptions, logoReference As Uri, wideLogoReference As Uri)
var secondaryTile = new secondaryTile(tileId, shortName, displayName, arguments, tileOptions, logoReference, wideLogoReference);

Parameters

tileId
String String String

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

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.

Note

This value is used only in Windows 8 and is deprecated in favor of the displayName in later versions.

displayName
String String String

A name to be displayed on the tile, in the tile's tooltip, and when showing small tiles, such as on the Apps or search results screens. This string is equivalent to the display name given in the manifest for the main tile. It is restricted to 256 characters, but in practice should be kept short to avoid truncation. This value can be set or retrieved through the DisplayName property.

The display name is shown only on the wide secondary tile on Windows Phone 8.1.

arguments
String String String

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
TileOptions TileOptions 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
Uri Uri Uri

A reference to a medium logo image stored at a Uniform Resource Identifier (URI). Can be set or retrieved through the Square150x150Logo property. This value can be expressed using one of these schemes: 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.

wideLogoReference
Uri Uri Uri

A reference to a wide logo image stored at a Uniform Resource Identifier (URI). Can be set or retrieved through the WideLogo property. This value can be expressed using one of these schemes: 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.

Remarks

To use this object from a desktop app, create the object, and then use the IInitializeWithWindow::Initialize method to associate the object with a window handle.

SecondaryTile(String, String, String, Uri, TileSize) SecondaryTile(String, String, String, Uri, TileSize) SecondaryTile(String, String, String, Uri, TileSize) SecondaryTile(String, String, String, Uri, TileSize) SecondaryTile(String, String, String, Uri, TileSize)

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

public : SecondaryTile(Platform::String tileId, Platform::String displayName, Platform::String arguments, Uri square150x150Logo, TileSize desiredSize)
SecondaryTile(winrt::hstring tileId, winrt::hstring displayName, winrt::hstring arguments, Uri square150x150Logo, TileSize desiredSize) const;
public SecondaryTile(String tileId, String displayName, String arguments, Uri square150x150Logo, TileSize desiredSize)
Public Sub New(tileId As String, displayName As String, arguments As String, square150x150Logo As Uri, desiredSize As TileSize)
var secondaryTile = new secondaryTile(tileId, displayName, arguments, square150x150Logo, desiredSize);

Parameters

tileId
String String String

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.

displayName
String String String

A name to be displayed on the tile, in the tile's tooltip, and when showing small tiles, such as on the Apps or search results screens. This string is equivalent to the display name given in the manifest for the main tile. It is restricted to 256 characters, but in practice should be kept short to avoid truncation. This value can be set or retrieved through the DisplayName property.

The display name is shown only on the wide secondary tile on Windows Phone 8.1.

arguments
String String String

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.

Note

This parameter must be URL-encoded for Windows Phone Silverlight 8.1 apps. All other app types can use their own structure.

square150x150Logo
Uri Uri Uri

A reference to a medium logo image stored at a Uniform Resource Identifier (URI). Can be set or retrieved through the SecondaryTileVisualElements.Square150x150Logo property. This value can be expressed using one of these schemes: 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.

desiredSize
TileSize TileSize TileSize

The size of tile to pin. This value must be Default (which provides Windows 8 behavior), Square150x150, or Wide310x150. Any other TileSize value causes an exception to be thrown during runtime.

The desiredSize parameter is ignored on Windows Phone 8.1. On the phone, all tiles— including secondary tiles— are pinned as medium tiles, after which they can be resized by the user.

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", 
                                                    "Secondary Tile Sample Secondary Tile", 
                                                    tileActivationArguments, 
                                                    uriLogo,
                                                    Windows.UI.StartScreen.TileSize.square150x150);

Remarks

To use this object from a desktop app, create the object, and then use the IInitializeWithWindow::Initialize method to associate the object with a window handle.