Share via


SecondaryTile Constructors

Definition

Overloads

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.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

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.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

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

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

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

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.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

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.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

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

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.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

public:
 SecondaryTile();
 SecondaryTile();
public SecondaryTile();
function SecondaryTile()
Public Sub New ()

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.

Applies to

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.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

public:
 SecondaryTile(Platform::String ^ tileId);
 SecondaryTile(winrt::hstring const& tileId);
public SecondaryTile(string tileId);
function SecondaryTile(tileId)
Public Sub New (tileId As String)

Parameters

tileId
String

Platform::String

winrt::hstring

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.

Applies to

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

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

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

public:
 SecondaryTile(Platform::String ^ tileId, Platform::String ^ displayName, Platform::String ^ arguments, Uri ^ square150x150Logo, TileSize desiredSize);
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& displayName, winrt::hstring const& arguments, Uri const& square150x150Logo, TileSize const& desiredSize);
public SecondaryTile(string tileId, string displayName, string arguments, System.Uri square150x150Logo, TileSize desiredSize);
function SecondaryTile(tileId, displayName, arguments, square150x150Logo, desiredSize)
Public Sub New (tileId As String, displayName As String, arguments As String, square150x150Logo As Uri, desiredSize As TileSize)

Parameters

tileId
String

Platform::String

winrt::hstring

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

Platform::String

winrt::hstring

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

Platform::String

winrt::hstring

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

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

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.

Applies to

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.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

public:
 SecondaryTile(Platform::String ^ tileId, Platform::String ^ shortName, Platform::String ^ displayName, Platform::String ^ arguments, TileOptions tileOptions, Uri ^ logoReference);
/// [Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& shortName, winrt::hstring const& displayName, winrt::hstring const& arguments, TileOptions const& tileOptions, Uri const& logoReference);
/// [Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& shortName, winrt::hstring const& displayName, winrt::hstring const& arguments, TileOptions const& tileOptions, Uri const& logoReference);
[Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, System.Uri logoReference);
[Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, System.Uri logoReference);
function SecondaryTile(tileId, shortName, displayName, arguments, tileOptions, logoReference)
Public Sub New (tileId As String, shortName As String, displayName As String, arguments As String, tileOptions As TileOptions, logoReference As Uri)

Parameters

tileId
String

Platform::String

winrt::hstring

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

Platform::String

winrt::hstring

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

Platform::String

winrt::hstring

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

Platform::String

winrt::hstring

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

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

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.

Attributes

Applies to

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.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

On Windows Phone 8.1, all tiles—including secondary tiles—are pinned 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);
/// [Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& shortName, winrt::hstring const& displayName, winrt::hstring const& arguments, TileOptions const& tileOptions, Uri const& logoReference, Uri const& wideLogoReference);
/// [Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& shortName, winrt::hstring const& displayName, winrt::hstring const& arguments, TileOptions const& tileOptions, Uri const& logoReference, Uri const& wideLogoReference);
[Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, System.Uri logoReference, System.Uri wideLogoReference);
[Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, System.Uri logoReference, System.Uri wideLogoReference);
function SecondaryTile(tileId, shortName, displayName, arguments, tileOptions, logoReference, 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)

Parameters

tileId
String

Platform::String

winrt::hstring

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

Platform::String

winrt::hstring

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

Platform::String

winrt::hstring

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

Platform::String

winrt::hstring

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

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

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

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.

Attributes

Applies to