SecondaryTile SecondaryTile SecondaryTile SecondaryTile Class

Creates, enumerates, and provides information about a secondary tile.

Syntax

Declaration

public sealed class SecondaryTilepublic sealed class SecondaryTilePublic NotInheritable Class SecondaryTile

Remarks

Examples

The following example creates and pins a secondary tile to the Start screen.


// Prepare package images for use as the Tile Logo and Small Logo in our tile to be pinned.
var uriLogo = new Windows.Foundation.Uri("ms-appx:///images/SecondaryTileDefault-sdk.png");
var uriSmallLogo = new Windows.Foundation.Uri("ms-appx:///images/smallLogoSecondaryTile-sdk.png");

// Create a tile to be be pinned.

// During creation of secondary tiles, an application can set additional arguments on the tile 
// that will be passed in during activation. These arguments should be meaningful to the application. 
// In this example, we'll pass in the date and time that the Secondary Tile was pinned.
var currentTime = new Date();
var tileActivationArguments = "timeTileWasPinned=" + currentTime;

// Specify the short name to display on the tile, the display name, arguments to be passed in 
// during activation, attributes regarding how to display the tile by default, and the tile logo.
// Note that you should pick a unique ID that is descriptive and meaningful to your application. 
// In this case, we explicitly code a single ID to focus our attention on the pinning operation.

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

// Specify a foreground text value.
// The secondary tile background color over which this text is shown is inherited from the 
// parent app unless a separate value is specified.
tile.foregroundText = Windows.UI.StartScreen.ForegroundText.dark;

// The small tile logo is inherited from the parent app unless overridden as we do here.
tile.smallLogo = uriSmallLogo;

// Attempt to pin the tile.
// Note that the status message is updated when the async operation to pin the tile completes.

tile.requestCreateAsync().then(function (isCreated) {
    if (isCreated) {
        // Secondary tile successfully pinned.
    } else {
        // Secondary tile not pinned.
    }
});

The following example demonstrates how to delete (unpin) a secondary tile by using the RequestDeleteAsync() method. Note that this example assumes that the tile exists. To determine whether the tile is pinned before you call RequestDeleteAsync(), see the Exists(System.String) method.


// Specify the secondary tile to be deleted, using the ID that it was given when it was originally created.
var tileToBeDeleted = new Windows.UI.StartScreen.SecondaryTile("SecondaryTile.01");

// Make the delete request.
tileToBeDeleted.requestDeleteAsync().then(function (isDeleted) {
    if (isDeleted) {
        // Secondary tile successfully deleted.
    } else {
        // Secondary tile not deleted.
    }
});

The following example demonstrates how to use the FindAllForPackageAsync() method to retrieve a list of IDs for all secondary tiles created for the calling app and any other app in the same package.


Windows.UI.StartScreen.SecondaryTile.findAllForPackageAsync().done(function (tiles) {
    tiles.forEach(function (tile) {
        var myTileId = tile.tileId;
        // Continue to process as necessary.
    });
});

The following example demonstrates how to use the CreateTileUpdaterForSecondaryTile(System.String) method to send a notification to a secondary tile with an ID of "SecondaryTile.Dynamic". Note that the example provides both a wide and square version of the notification because the user has control over which form of the tile is showing.


var notifications = Windows.UI.Notifications;

// Define the notification content.
var tileXml = notifications.TileUpdateManager.getTemplateContent(notifications.TileTemplateType.tileWide310x150Text04);
var tileTextAttributes = tileXml.getElementsByTagName("text");
tileTextAttributes[0].appendChild(tileXml.createTextNode("Sent to a secondary tile!"));

// Provide a square version of the notification.
var squareTileXml = notifications.TileUpdateManager.getTemplateContent(notifications.TileTemplateType.tileSquare150x150Text04);
var squareTileTextAttributes = squareTileXml.getElementsByTagName("text");
squareTileTextAttributes[0].appendChild(squareTileXml.createTextNode("Sent to a secondary tile!"));

// Add the medium tile to the notification.
var node = tileXml.importNode(squareTileXml.getElementsByTagName("binding").item(0), true);
tileXml.getElementsByTagName("visual").item(0).appendChild(node);

// Create the notification based on the XML content.
var tileNotification = new notifications.TileNotification(tileXml);

// Create a secondary tile updater, passing it the ID of the tile.
var tileUpdater = notifications.TileUpdateManager.createTileUpdaterForSecondaryTile("SecondaryTile.Dynamic");

// Send the notification to the secondary tile.
tileUpdater.update(tileNotification);

The following example demonstrates how to use the CreateBadgeUpdaterForSecondaryTile(System.String) method to send a numeric badge notification to a secondary tile with an ID of "SecondaryTile.Dynamic".


var notifications = Windows.UI.Notifications;

// Define the badge content
var badgeNotification = notifications.BadgeUpdateManager.getTemplateContent(notifications.BadgeTemplateType.badgeNumber);
var badgeAttributes = badgeNotification.getElementsByTagName("badge");
badgeAttributes[0].setAttribute("value", "6");

// Create the notification based on the XML content.
var badge = new notifications.BadgeNotification(badgeNotification);

// Create a secondary tile updater, passing it the ID of the tile.
notifications.BadgeUpdateManager.createBadgeUpdaterForSecondaryTile("SecondaryTile.Dynamic");

// Send the notification to the secondary tile.
tileUpdater.update(tileNotification);

Constructors summary

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

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.

Note

This constructor may be altered or unavailable for releases after Windows 8.1. Instead, use @Windows.UI.StartScreen.SecondaryTile.#ctor(System.String,System.String,System.String,Windows.Foundation.Uri,Windows.UI.StartScreen.TileSize).

Creates a SecondaryTile object as a medium tile.

Note

This constructor may be altered or unavailable for releases after Windows 8.1. Instead, use @Windows.UI.StartScreen.SecondaryTile.#ctor(System.String,System.String,System.String,Windows.Foundation.Uri,Windows.UI.StartScreen.TileSize) and supply other tile sizes and options through 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.

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

Properties summary

Gets or sets an app-defined set of information that is passed from the secondary tile to the app on activation. This property is required when you create a tile.

Note

BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use BackgroundColor.

Gets or sets the tile's background color.

Gets or sets a name that is associated with and displayed on the tile. This name is displayed on the tile in Start, in the tile's tooltip, next to the small tile representation in the Apps list, and in some Control Panel applications. This property is required when you create a tile. It is the equivalent of the display name declared in the manifest for the app's main tile.

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

Note

ForegroundText may be altered or unavailable for releases after Windows 8.1. Instead, use ForegroundText.

Gets or sets whether the tile should use dark or light text.

Gets or sets the location of a badge logo image to represent the secondary tile on the lock screen. By supplying this image, you declare that the secondary tile is eligible to display a badge on the lock screen. If you also want the secondary tile to be eligible for the lock screen's detailed tile slot, you must also set the LockScreenDisplayBadgeAndTileText property to True.

Note

Stating that your secondary tile is eligible for a lock screen presence does not guarantee that it will have one. Only the user can add an app to one of the seven lock screen slots. For more information, see the Lock screen overview.

Gets or sets whether the secondary tile is eligible to display both a badge and a detailed tile on the lock screen. If you set this property to True, you must also provide a badge image through the LockScreenBadgeLogo property. If you do not want to use the detailed tile capability, provide a badge image through the LockScreenBadgeLogo property and set LockScreenDisplayBadgeAndTileText to False.

Note

Stating that your secondary tile is eligible for a lock screen presence does not guarantee that it will have one. Only the user can add an app to one of the seven lock screen slots, as well as choosing which one of them can display detailed tile information. For more information, see the Lock screen overview.

Note

Logo may be altered or unavailable for releases after Windows 8.1. Instead, use Square150x150Logo.

Gets or sets the logo image used in a medium tile. This property is required when you create either a square or a wide tile.

Gets or sets a phonetic version of the secondary tile name. Used with character-based languages for UI sorting purposes.

Gets or sets a value that determines whether the secondary tile will be reacquired through the cloud when the parent app is installed by the user, using their Microsoft account, on another computer. Note that as of Windows 8.1, roaming is the default behavior. This is the opposite of the default Windows 8 behavior, where roaming was opt-in.

This property always returns false on Windows Phone 8.1.

Note

ShortName may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayName.

Gets or sets a short name to display directly on the tile.

Note

As of Windows 8.1, this property is ignored and the display name declared in the manifest is used in its place.

Note

SmallLogo may be altered or unavailable for releases after Windows 8.1. Instead, use Square30x30Logo.

Gets or sets the small logo image, used in search results, the All Programs list, and other locations in the UI.

The small logo is not used with a Windows Phone 8.1 secondary tile.

Gets or sets a unique string to identify the tile within the package. This property is required when you create or delete a tile.

Note

TileOptions may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.

Gets or sets options available to a secondary tile.

Gets an object through which you can get or set a secondary tile's background color, foreground text, tile images, and app name display options. As of Windows 8.1, the properties of this object replace these SecondaryTile properties:

Note

WideLogo may be altered or unavailable for releases after Windows 8.1. Instead, use Wide310x150Logo.

Gets or sets the logo image used in a wide secondary tile. This property is required when you create a wide secondary tile and gives the user the option of a wide tile when they resize the tile.

Methods summary

Checks whether a specific secondary tile exists for the calling app.

Retrieves a list of secondary tiles created for the calling app.

Retrieves a list of secondary tiles created for another app in the same package as the calling app.

Retrieves a list of secondary tiles created for all of the apps in the package of the calling app.

When an app launches, it should always enumerate its secondary tiles through this method, in case there were any additions or deletions of which it was unaware. When a secondary tile is deleted through the Start screen app bar, Windows simply removes the tile. The app itself is responsible for releasing any resources that were used by the secondary tile. When secondary tiles are copied through the cloud, current tile or badge notifications on the secondary tile, scheduled notifications, push notification channels, and Uniform Resource Identifier (URI) used with periodic notifications are not copied with the secondary tile and must be reset up.

Displays the Pin to Start flyout, through which the user can confirm that they want to create the secondary tile, which in turn creates the tile. Overloads of this method let you specify the on-screen location of the flyout.

Note

It is a best practice to display the Pin to Start flyout near the button that invoked the request to create the tile. Therefore, we recommend that you use the RequestCreateAsync(Windows.Foundation.Point) form of this method overload.

On Windows Phone 8.1, the secondary tile is created through this call without showing the user a flyout, prompting them for confirmation, or allowing them to choose a tile size or title text. Note that when using the RequestCreateAsync() method to pin a secondary tile in Windows Phone Store app, the app is suspended and the user is taken to the Start screen. This same API call on a PC does not suspend the program. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

Displays the Pin to Start flyout above a specified location, through which the user can confirm that they want to create the secondary tile, which in turn creates the tile.

On Windows Phone 8.1, the secondary tile is created through this call without showing the user a flyout, prompting them for confirmation, or allowing them to choose a tile size or title text. Note that when using the RequestCreateAsync() method to pin a secondary tile in Windows Phone Store app, the app is suspended and the user is taken to the Start screen. This same API call on a PC does not suspend the program. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

Displays the Pin to Start flyout above a specified area. This flyout is used by the user to confirm that they want to create the secondary tile, which in turn creates the tile.

On Windows Phone 8.1, the secondary tile is created through this call without showing the user a flyout, prompting them for confirmation, or allowing them to choose a tile size or title text. Note that when using the RequestCreateAsync() method to pin a secondary tile in Windows Phone Store app, the app is suspended and the user is taken to the Start screen. This same API call on a PC does not suspend the program. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

Displays the Pin to Start flyout at the specified side of a specified area. This flyout is used by the user to confirm that they want to create the secondary tile, which in turn creates the tile.

On Windows Phone 8.1, the secondary tile is created through this call without showing the user a flyout, prompting them for confirmation, or allowing them to choose a tile size or title text. Note that when using the RequestCreateAsync() method to pin a secondary tile in Windows Phone Store app, the app is suspended and the user is taken to the Start screen. This same API call on a PC does not suspend the program. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

Displays the Unpin from Start flyout. This flyout lets the user confirm removal of the secondary tile.

Displays the Unpin from Start flyout at a specified point. This flyout lets the user confirm removal of the secondary tile.

Displays the Unpin from Start flyout above a specified area. This flyout lets the user confirm removal of the secondary tile.

Displays the Unpin from Start flyout at the specified side of a specified area. This flyout lets the user confirm removal of the secondary tile.

Updates a secondary tile after that tile is pinned to the Start screen.

On Windows Phone 8.1, your app is suspended and the user is taken to the Start screen when a secondary tile is pinned. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

Events summary

Fired when a call is made to RequestCreateAsync().

This event is not raised on Windows Phone 8.1.

Constructors

  • 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()public SecondaryTile()Public Function SecondaryTile() As

    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.

  • SecondaryTile(System.String)
    SecondaryTile(System.String)
    SecondaryTile(System.String)
    SecondaryTile(System.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(System.String tileId)public SecondaryTile(System.String tileId)Public Function SecondaryTile(tileId As System.String) As

    Parameters

    • tileId
      System.String
      System.String
      System.String
      System.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.

  • SecondaryTile(System.String,System.String,System.String,System.String,Windows.UI.StartScreen.TileOptions,Windows.Foundation.Uri)
    SecondaryTile(System.String,System.String,System.String,System.String,Windows.UI.StartScreen.TileOptions,Windows.Foundation.Uri)
    SecondaryTile(System.String,System.String,System.String,System.String,Windows.UI.StartScreen.TileOptions,Windows.Foundation.Uri)
    SecondaryTile(System.String,System.String,System.String,System.String,Windows.UI.StartScreen.TileOptions,Windows.Foundation.Uri)
    Note

    This constructor may be altered or unavailable for releases after Windows 8.1. Instead, use @Windows.UI.StartScreen.SecondaryTile.#ctor(System.String,System.String,System.String,Windows.Foundation.Uri,Windows.UI.StartScreen.TileSize).

    Creates a SecondaryTile object as a medium tile.

    public SecondaryTile(System.String tileId,System.String shortName,System.String displayName,System.String arguments,Windows.UI.StartScreen.TileOptions tileOptions,Windows.Foundation.Uri logoReference)public SecondaryTile(System.String tileId,System.String shortName,System.String displayName,System.String arguments,Windows.UI.StartScreen.TileOptions tileOptions,Windows.Foundation.Uri logoReference)Public Function SecondaryTile(tileId As System.String,shortName As System.String,displayName As System.String,arguments As System.String,tileOptions As Windows.UI.StartScreen.TileOptions,logoReference As Windows.Foundation.Uri) As

    Parameters

    • tileId
      System.String
      System.String
      System.String
      System.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
      System.String
      System.String
      System.String
      System.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
      System.String
      System.String
      System.String
      System.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
      System.String
      System.String
      System.String
      System.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

      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

      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.

  • SecondaryTile(System.String,System.String,System.String,System.String,Windows.UI.StartScreen.TileOptions,Windows.Foundation.Uri,Windows.Foundation.Uri)
    SecondaryTile(System.String,System.String,System.String,System.String,Windows.UI.StartScreen.TileOptions,Windows.Foundation.Uri,Windows.Foundation.Uri)
    SecondaryTile(System.String,System.String,System.String,System.String,Windows.UI.StartScreen.TileOptions,Windows.Foundation.Uri,Windows.Foundation.Uri)
    SecondaryTile(System.String,System.String,System.String,System.String,Windows.UI.StartScreen.TileOptions,Windows.Foundation.Uri,Windows.Foundation.Uri)
    Note

    This constructor may be altered or unavailable for releases after Windows 8.1. Instead, use @Windows.UI.StartScreen.SecondaryTile.#ctor(System.String,System.String,System.String,Windows.Foundation.Uri,Windows.UI.StartScreen.TileSize) and supply other tile sizes and options through 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(System.String tileId,System.String shortName,System.String displayName,System.String arguments,Windows.UI.StartScreen.TileOptions tileOptions,Windows.Foundation.Uri logoReference,Windows.Foundation.Uri wideLogoReference)public SecondaryTile(System.String tileId,System.String shortName,System.String displayName,System.String arguments,Windows.UI.StartScreen.TileOptions tileOptions,Windows.Foundation.Uri logoReference,Windows.Foundation.Uri wideLogoReference)Public Function SecondaryTile(tileId As System.String,shortName As System.String,displayName As System.String,arguments As System.String,tileOptions As Windows.UI.StartScreen.TileOptions,logoReference As Windows.Foundation.Uri,wideLogoReference As Windows.Foundation.Uri) As

    Parameters

    • tileId
      System.String
      System.String
      System.String
      System.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
      System.String
      System.String
      System.String
      System.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
      System.String
      System.String
      System.String
      System.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
      System.String
      System.String
      System.String
      System.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

      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

      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

      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.

  • SecondaryTile(System.String,System.String,System.String,Windows.Foundation.Uri,Windows.UI.StartScreen.TileSize)
    SecondaryTile(System.String,System.String,System.String,Windows.Foundation.Uri,Windows.UI.StartScreen.TileSize)
    SecondaryTile(System.String,System.String,System.String,Windows.Foundation.Uri,Windows.UI.StartScreen.TileSize)
    SecondaryTile(System.String,System.String,System.String,Windows.Foundation.Uri,Windows.UI.StartScreen.TileSize)

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

    public SecondaryTile(System.String tileId,System.String displayName,System.String arguments,Windows.Foundation.Uri square150x150Logo,Windows.UI.StartScreen.TileSize desiredSize)public SecondaryTile(System.String tileId,System.String displayName,System.String arguments,Windows.Foundation.Uri square150x150Logo,Windows.UI.StartScreen.TileSize desiredSize)Public Function SecondaryTile(tileId As System.String,displayName As System.String,arguments As System.String,square150x150Logo As Windows.Foundation.Uri,desiredSize As Windows.UI.StartScreen.TileSize) As

    Parameters

    • tileId
      System.String
      System.String
      System.String
      System.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
      System.String
      System.String
      System.String
      System.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
      System.String
      System.String
      System.String
      System.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

      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.

    • desiredSize

      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.

    Remarks

    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);
    

Properties

  • Arguments
    Arguments
    Arguments
    Arguments

    Gets or sets an app-defined set of information that is passed from the secondary tile to the app on activation. This property is required when you create a tile.

    public string Arguments { get; set; }public string Arguments { get; set; }Public ReadWrite Property Arguments As string

    Property Value

    • string
      string
      string
      string

      The argument string, of 2048 or fewer characters. This contents of this string are understood by the app. Any string longer than 2048 characters will cause an exception to be thrown. This string is passed to the app through the Arguments property.

    Remarks

    When an app is activated through this secondary tile (by click, touch, or keyboard), the tile sends this argument string to the app.

  • BackgroundColor
    BackgroundColor
    BackgroundColor
    BackgroundColor
    Note

    BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use BackgroundColor.

    Gets or sets the tile's background color.

    public Color BackgroundColor { get; set; }public Color BackgroundColor { get; set; }Public ReadWrite Property BackgroundColor As Color

    Property Value

    Remarks

    If this property is not set, its value is inherited from the background color of the parent app's tile.

    Examples

    The following lines show different ways to express the color through this property.

    
    secondaryTile.backgroundColor = Windows.UI.Colors.magenta;
    
    
    secondaryTile.BackgroundColor = Windows.UI.Color.Magenta;
    secondaryTile.BackgroundColor = Windows.UI.Color.FromArgb(255, 255, 255, 255);
    
    
    secondaryTile->BackgroundColor = Windows::UI::Colors::Magenta;
    secondaryTile->BackgroundColor = Windows::UI::ColorHelper::FromArgb(0, 255, 255, 120);
    
  • DisplayName
    DisplayName
    DisplayName
    DisplayName

    Gets or sets a name that is associated with and displayed on the tile. This name is displayed on the tile in Start, in the tile's tooltip, next to the small tile representation in the Apps list, and in some Control Panel applications. This property is required when you create a tile. It is the equivalent of the display name declared in the manifest for the app's main tile.

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

    public string DisplayName { get; set; }public string DisplayName { get; set; }Public ReadWrite Property DisplayName As string

    Property Value

    • string
      string
      string
      string

      The display name. This string is limited to 256 characters, but in reality should be kept short to avoid truncation.

    Remarks

    This display name is visible to searches.

  • ForegroundText
    ForegroundText
    ForegroundText
    ForegroundText
    Note

    ForegroundText may be altered or unavailable for releases after Windows 8.1. Instead, use ForegroundText.

    Gets or sets whether the tile should use dark or light text.

    public ForegroundText ForegroundText { get; set; }public ForegroundText ForegroundText { get; set; }Public ReadWrite Property ForegroundText As ForegroundText

    Property Value

    Remarks

    This property is ignored on Windows Phone 8.1.

    If this property is not specified, it is inherited from the foreground text property of the parent app's tile.

    Only two text colors are available— default dark and default light— and are set by Windows. Choose the text color that will look best with your choice of BackgroundColor and the opacity of your logo image.

  • LockScreenDisplayBadgeAndTileText
    LockScreenDisplayBadgeAndTileText
    LockScreenDisplayBadgeAndTileText
    LockScreenDisplayBadgeAndTileText

    Gets or sets whether the secondary tile is eligible to display both a badge and a detailed tile on the lock screen. If you set this property to True, you must also provide a badge image through the LockScreenBadgeLogo property. If you do not want to use the detailed tile capability, provide a badge image through the LockScreenBadgeLogo property and set LockScreenDisplayBadgeAndTileText to False.

    Note

    Stating that your secondary tile is eligible for a lock screen presence does not guarantee that it will have one. Only the user can add an app to one of the seven lock screen slots, as well as choosing which one of them can display detailed tile information. For more information, see the Lock screen overview.

    public bool LockScreenDisplayBadgeAndTileText { get; set; }public bool LockScreenDisplayBadgeAndTileText { get; set; }Public ReadWrite Property LockScreenDisplayBadgeAndTileText As bool

    Property Value

    • bool
      bool
      bool
      bool

      True if the secondary tile can have a lock screen presence; otherwise, False.

  • PhoneticName
    PhoneticName
    PhoneticName
    PhoneticName

    Gets or sets a phonetic version of the secondary tile name. Used with character-based languages for UI sorting purposes.

    public string PhoneticName { get; set; }public string PhoneticName { get; set; }Public ReadWrite Property PhoneticName As string

    Property Value

    • string
      string
      string
      string

      The phonetic name.

    Remarks

    In certain character-based languages such as Japanese, the sort order in the UI is based on a phonetic spelling of the characters that make up the app's display name. This phonetic spelling is a separate string from the display name. When a user pins a secondary tile, they can specify a display name for that tile in the pinning flyout but they cannot specify a phonetic spelling. Windows makes a guess as to the phonetic string, but it is not always right.

    Apps, however, sometimes know the right phonetic string because the app lets a user define it. In Windows 8.1, an app can then use that information to set this property. Note that this string is tied to the default display name associated with the secondary tile. If the user changes the display name through the pinning flyout, then the system's guess for the phonetic spelling will be used instead.

  • RoamingEnabled
    RoamingEnabled
    RoamingEnabled
    RoamingEnabled

    Gets or sets a value that determines whether the secondary tile will be reacquired through the cloud when the parent app is installed by the user, using their Microsoft account, on another computer. Note that as of Windows 8.1, roaming is the default behavior. This is the opposite of the default Windows 8 behavior, where roaming was opt-in.

    This property always returns false on Windows Phone 8.1.

    public bool RoamingEnabled { get; set; }public bool RoamingEnabled { get; set; }Public ReadWrite Property RoamingEnabled As bool

    Property Value

    • bool
      bool
      bool
      bool

      Set to true if roaming is enabled; otherwise, false. The default is true.

      Setting this value in a Windows Phone Store app has no effect, and this property always returns false.

  • ShortName
    ShortName
    ShortName
    ShortName
    Note

    ShortName may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayName.

    Gets or sets a short name to display directly on the tile.

    Note

    As of Windows 8.1, this property is ignored and the display name declared in the manifest is used in its place.

    public string ShortName { get; set; }public string ShortName { get; set; }Public ReadWrite Property ShortName As string

    Property Value

    • string
      string
      string
      string

      The short name. Anything over 40 characters will be truncated. The user has the option to change this value as part of the pinning process.

    Remarks

    This display name is shown on the tile if the TileOptions attribute is set through either the tile constructor or the TileOptions property.

    This display name is visible to searches.

    The user has the option to change this value to a string of their own choosing as part of the pinning process.

  • TileId
    TileId
    TileId
    TileId

    Gets or sets a unique string to identify the tile within the package. This property is required when you create or delete a tile.

    public string TileId { get; set; }public string TileId { get; set; }Public ReadWrite Property TileId As string

    Property Value

    • string
      string
      string
      string

      A unique identifier, 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 (_). It cannot contain spaces, commas, or any of these characters: | > < " / ? * \ ; : ! '

    Remarks

    If two secondary tiles have the same ID, the last one to be pinned will overwrite the existing tile.

  • TileOptions
    TileOptions
    TileOptions
    TileOptions
    Note

    TileOptions may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.

    Gets or sets options available to a secondary tile.

    public TileOptions TileOptions { get; set; }public TileOptions TileOptions { get; set; }Public ReadWrite Property TileOptions As TileOptions

    Property Value

    Remarks

    The default value for this property is None.

  • VisualElements
    VisualElements
    VisualElements
    VisualElements

    Gets an object through which you can get or set a secondary tile's background color, foreground text, tile images, and app name display options. As of Windows 8.1, the properties of this object replace these SecondaryTile properties:

    public SecondaryTileVisualElements VisualElements { get; }public SecondaryTileVisualElements VisualElements { get; }Public ReadOnly Property VisualElements As SecondaryTileVisualElements

    Property Value

Methods

  • Exists(System.String)
    Exists(System.String)
    Exists(System.String)
    Exists(System.String)

    Checks whether a specific secondary tile exists for the calling app.

    public static bool Exists(System.String tileId)public static bool Exists(System.String tileId)Public Static Function Exists(tileId As System.String) As bool

    Parameters

    • tileId
      System.String
      System.String
      System.String
      System.String

      The unique ID string that was assigned to the tile when it was created.

    Returns

    • bool
      bool
      bool
      bool

      True if the tile exists in the calling application; otherwise, false.

  • FindAllAsync()
    FindAllAsync()
    FindAllAsync()
    FindAllAsync()

    Retrieves a list of secondary tiles created for the calling app.

    public static IAsyncOperation<SecondaryTile>> FindAllAsync()public static IAsyncOperation<SecondaryTile>> FindAllAsync()Public Static Function FindAllAsync() As IAsyncOperation( Of SecondaryTile )

    Returns

    • An enumeration object that allows you to examine the set of tiles.

  • FindAllAsync(System.String)
    FindAllAsync(System.String)
    FindAllAsync(System.String)
    FindAllAsync(System.String)

    Retrieves a list of secondary tiles created for another app in the same package as the calling app.

    public static IAsyncOperation<SecondaryTile>> FindAllAsync(System.String applicationId)public static IAsyncOperation<SecondaryTile>> FindAllAsync(System.String applicationId)Public Static Function FindAllAsync(applicationId As System.String) As IAsyncOperation( Of SecondaryTile )

    Parameters

    • applicationId
      System.String
      System.String
      System.String
      System.String

      The Package Relative Application ID (PRAID) of the app.

    Returns

    • An enumeration object that allows you to examine the set of tiles.

  • FindAllForPackageAsync()
    FindAllForPackageAsync()
    FindAllForPackageAsync()
    FindAllForPackageAsync()

    Retrieves a list of secondary tiles created for all of the apps in the package of the calling app.

    When an app launches, it should always enumerate its secondary tiles through this method, in case there were any additions or deletions of which it was unaware. When a secondary tile is deleted through the Start screen app bar, Windows simply removes the tile. The app itself is responsible for releasing any resources that were used by the secondary tile. When secondary tiles are copied through the cloud, current tile or badge notifications on the secondary tile, scheduled notifications, push notification channels, and Uniform Resource Identifier (URI) used with periodic notifications are not copied with the secondary tile and must be reset up.

    public static IAsyncOperation<SecondaryTile>> FindAllForPackageAsync()public static IAsyncOperation<SecondaryTile>> FindAllForPackageAsync()Public Static Function FindAllForPackageAsync() As IAsyncOperation( Of SecondaryTile )

    Returns

    • An enumeration object that allows you to examine the set of tiles.

    Remarks

    This method returns a collection of tile IDs through an instance of the IAsyncOperation<TResult> interface. When the asynchronous operation completes successfully, it returns the collection object through a then or done method.

  • RequestCreateAsync()
    RequestCreateAsync()
    RequestCreateAsync()
    RequestCreateAsync()

    Displays the Pin to Start flyout, through which the user can confirm that they want to create the secondary tile, which in turn creates the tile. Overloads of this method let you specify the on-screen location of the flyout.

    Note

    It is a best practice to display the Pin to Start flyout near the button that invoked the request to create the tile. Therefore, we recommend that you use the RequestCreateAsync(Windows.Foundation.Point) form of this method overload.

    On Windows Phone 8.1, the secondary tile is created through this call without showing the user a flyout, prompting them for confirmation, or allowing them to choose a tile size or title text. Note that when using the RequestCreateAsync() method to pin a secondary tile in Windows Phone Store app, the app is suspended and the user is taken to the Start screen. This same API call on a PC does not suspend the program. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

    public IAsyncOperation<bool> RequestCreateAsync()public IAsyncOperation<bool> RequestCreateAsync()Public Function RequestCreateAsync() As IAsyncOperation( Of bool )

    Returns

    • An object used to launch the asynchronous create operation as well as to retrieve information about it.

    Remarks

    After a secondary tile is created, you must provide the following properties before it is displayed:

    This method returns an asynchronous Boolean value through its IAsyncOperation<TResult> object as shown here. A value of true indicates that the secondary tile was created and pinned to the Start screen.

    secondaryTile.requestCreateAsync().then( function (isPinned) { } );
    
    async void showTileCreateRequest( SecondaryTile tile )  
    {      
        bool isPinned = await tile.requestCreateAsync();  
    }
    

    Examples

    The following example creates and pins a previously defined SecondaryTile object "tile" to the Start screen.

    
    tile.requestCreateAsync().then(function (isCreated) {
        if (isCreated) {
            // Secondary tile successfully pinned.
        } else {
            // Secondary tile not pinned.
        }
    });
    
  • RequestCreateAsync(Windows.Foundation.Point)
    RequestCreateAsync(Windows.Foundation.Point)
    RequestCreateAsync(Windows.Foundation.Point)
    RequestCreateAsync(Windows.Foundation.Point)

    Displays the Pin to Start flyout above a specified location, through which the user can confirm that they want to create the secondary tile, which in turn creates the tile.

    On Windows Phone 8.1, the secondary tile is created through this call without showing the user a flyout, prompting them for confirmation, or allowing them to choose a tile size or title text. Note that when using the RequestCreateAsync() method to pin a secondary tile in Windows Phone Store app, the app is suspended and the user is taken to the Start screen. This same API call on a PC does not suspend the program. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

    public IAsyncOperation<bool> RequestCreateAsync(Windows.Foundation.Point invocationPoint)public IAsyncOperation<bool> RequestCreateAsync(Windows.Foundation.Point invocationPoint)Public Function RequestCreateAsync(invocationPoint As Windows.Foundation.Point) As IAsyncOperation( Of bool )

    Parameters

    • invocationPoint

      The point used as the lower-right corner of the Pin to Start flyout.

    Returns

    • An object that provides information concerning the asynchronous create operation.

  • RequestCreateForSelectionAsync(Windows.Foundation.Rect)
    RequestCreateForSelectionAsync(Windows.Foundation.Rect)
    RequestCreateForSelectionAsync(Windows.Foundation.Rect)
    RequestCreateForSelectionAsync(Windows.Foundation.Rect)

    Displays the Pin to Start flyout above a specified area. This flyout is used by the user to confirm that they want to create the secondary tile, which in turn creates the tile.

    On Windows Phone 8.1, the secondary tile is created through this call without showing the user a flyout, prompting them for confirmation, or allowing them to choose a tile size or title text. Note that when using the RequestCreateAsync() method to pin a secondary tile in Windows Phone Store app, the app is suspended and the user is taken to the Start screen. This same API call on a PC does not suspend the program. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

    public IAsyncOperation<bool> RequestCreateForSelectionAsync(Windows.Foundation.Rect selection)public IAsyncOperation<bool> RequestCreateForSelectionAsync(Windows.Foundation.Rect selection)Public Function RequestCreateForSelectionAsync(selection As Windows.Foundation.Rect) As IAsyncOperation( Of bool )

    Parameters

    • selection

      The area that the flyout is displayed directly above.

    Returns

    • An object that provides information concerning the asynchronous create operation.

    Remarks

    After a secondary tile is created, you must provide the following properties before it is displayed:

  • RequestCreateForSelectionAsync(Windows.Foundation.Rect,Windows.UI.Popups.Placement)
    RequestCreateForSelectionAsync(Windows.Foundation.Rect,Windows.UI.Popups.Placement)
    RequestCreateForSelectionAsync(Windows.Foundation.Rect,Windows.UI.Popups.Placement)
    RequestCreateForSelectionAsync(Windows.Foundation.Rect,Windows.UI.Popups.Placement)

    Displays the Pin to Start flyout at the specified side of a specified area. This flyout is used by the user to confirm that they want to create the secondary tile, which in turn creates the tile.

    On Windows Phone 8.1, the secondary tile is created through this call without showing the user a flyout, prompting them for confirmation, or allowing them to choose a tile size or title text. Note that when using the RequestCreateAsync() method to pin a secondary tile in Windows Phone Store app, the app is suspended and the user is taken to the Start screen. This same API call on a PC does not suspend the program. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

    public IAsyncOperation<bool> RequestCreateForSelectionAsync(Windows.Foundation.Rect selection,Windows.UI.Popups.Placement preferredPlacement)public IAsyncOperation<bool> RequestCreateForSelectionAsync(Windows.Foundation.Rect selection,Windows.UI.Popups.Placement preferredPlacement)Public Function RequestCreateForSelectionAsync(selection As Windows.Foundation.Rect,preferredPlacement As Windows.UI.Popups.Placement) As IAsyncOperation( Of bool )

    Parameters

    Returns

    • An object that provides information concerning the asynchronous create operation.

  • RequestDeleteAsync()
    RequestDeleteAsync()
    RequestDeleteAsync()
    RequestDeleteAsync()

    Displays the Unpin from Start flyout. This flyout lets the user confirm removal of the secondary tile.

    public IAsyncOperation<bool> RequestDeleteAsync()public IAsyncOperation<bool> RequestDeleteAsync()Public Function RequestDeleteAsync() As IAsyncOperation( Of bool )

    Returns

    • An object that provides information concerning the asynchronous delete operation.

    Remarks

    Examples

    The following example demonstrates how to delete (unpin) a secondary tile. Note that this example assumes that the tile exists. To determine whether the tile is pinned before you call RequestDeleteAsync(), see the Exists(System.String) method.

    
    // Specify the tile to be deleted, using the ID that it was given when it was originally created.
    var tileToBeDeleted = new Windows.UI.StartScreen.SecondaryTile("SecondaryTile.01");
    
    // Make the delete request.
    tileToBeDeleted.requestDeleteAsync().then(function (isDeleted) {
        if (isDeleted) {
            // Secondary tile successfully deleted.
        } else {
            // Secondary tile not deleted.
        }
    });
    
  • RequestDeleteAsync(Windows.Foundation.Point)
    RequestDeleteAsync(Windows.Foundation.Point)
    RequestDeleteAsync(Windows.Foundation.Point)
    RequestDeleteAsync(Windows.Foundation.Point)

    Displays the Unpin from Start flyout at a specified point. This flyout lets the user confirm removal of the secondary tile.

    public IAsyncOperation<bool> RequestDeleteAsync(Windows.Foundation.Point invocationPoint)public IAsyncOperation<bool> RequestDeleteAsync(Windows.Foundation.Point invocationPoint)Public Function RequestDeleteAsync(invocationPoint As Windows.Foundation.Point) As IAsyncOperation( Of bool )

    Parameters

    • invocationPoint

      The point used as the lower-right corner of the Pin to Start flyout.

    Returns

    • An object that provides information concerning the asynchronous delete operation.

    Remarks

    The only property that must be set on the tile before calling this method is TileId. If TileId is not set, the call to this method raises an exception.

    This method returns an asynchronous Boolean value through its IAsyncOperation<TResult> method as shown here.

    
    [JavaScript]  
    oSecondaryTile.requestCreateAsync( { x:100, y:100 } ).then( function (isDeleted) { } );      
    
    [C#]  
    void async showTileCreateRequest( SecondaryTile tile, Point pt)  
    {      
        bool isDeleted = await tile.requestCreateAsync( pt );  
    }
    
  • RequestDeleteForSelectionAsync(Windows.Foundation.Rect)
    RequestDeleteForSelectionAsync(Windows.Foundation.Rect)
    RequestDeleteForSelectionAsync(Windows.Foundation.Rect)
    RequestDeleteForSelectionAsync(Windows.Foundation.Rect)

    Displays the Unpin from Start flyout above a specified area. This flyout lets the user confirm removal of the secondary tile.

    public IAsyncOperation<bool> RequestDeleteForSelectionAsync(Windows.Foundation.Rect selection)public IAsyncOperation<bool> RequestDeleteForSelectionAsync(Windows.Foundation.Rect selection)Public Function RequestDeleteForSelectionAsync(selection As Windows.Foundation.Rect) As IAsyncOperation( Of bool )

    Parameters

    • selection

      The area that the secondary tile is displayed directly above.

    Returns

    • An object that provides information concerning the asynchronous delete operation.

    Remarks

    The only property that must be set on the tile before calling this method is TileId. If TileId is not set, the call to this method raises an exception.

  • RequestDeleteForSelectionAsync(Windows.Foundation.Rect,Windows.UI.Popups.Placement)
    RequestDeleteForSelectionAsync(Windows.Foundation.Rect,Windows.UI.Popups.Placement)
    RequestDeleteForSelectionAsync(Windows.Foundation.Rect,Windows.UI.Popups.Placement)
    RequestDeleteForSelectionAsync(Windows.Foundation.Rect,Windows.UI.Popups.Placement)

    Displays the Unpin from Start flyout at the specified side of a specified area. This flyout lets the user confirm removal of the secondary tile.

    public IAsyncOperation<bool> RequestDeleteForSelectionAsync(Windows.Foundation.Rect selection,Windows.UI.Popups.Placement preferredPlacement)public IAsyncOperation<bool> RequestDeleteForSelectionAsync(Windows.Foundation.Rect selection,Windows.UI.Popups.Placement preferredPlacement)Public Function RequestDeleteForSelectionAsync(selection As Windows.Foundation.Rect,preferredPlacement As Windows.UI.Popups.Placement) As IAsyncOperation( Of bool )

    Parameters

    Returns

    • An object that provides information concerning the asynchronous delete operation.

  • UpdateAsync()
    UpdateAsync()
    UpdateAsync()
    UpdateAsync()

    Updates a secondary tile after that tile is pinned to the Start screen.

    On Windows Phone 8.1, your app is suspended and the user is taken to the Start screen when a secondary tile is pinned. Therefore, be aware that any code called after RequestCreateAsync() is not guaranteed to be run before the app is suspended. To avoid this potential issue you should use the OnSuspended event of your app to run any code, such as updating the pinned tile, that should be run before the app suspends. To see an example of this pattern, download and run the Tile update on suspend sample.

    public IAsyncOperation<bool> UpdateAsync()public IAsyncOperation<bool> UpdateAsync()Public Function UpdateAsync() As IAsyncOperation( Of bool )

    Returns

    • An object used to launch the asynchronous create operation as well as to retrieve information about it.

    Remarks

    This method updates the following properties of the secondary tile:

    On Windows 8 and Windows 8.1, this method doesn't update these properties:

    If the TileId property is not set before you call this method, the call will raise an exception.

Events

  • VisualElementsRequested
    VisualElementsRequested
    VisualElementsRequested
    VisualElementsRequested

    Fired when a call is made to RequestCreateAsync().

    This event is not raised on Windows Phone 8.1.

    public event TypedEventHandler VisualElementsRequestedpublic event TypedEventHandler VisualElementsRequestedPublic Event VisualElementsRequested

    Remarks

    This event is not raised for Windows Phone Store app.

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.MuseAttribute
Windows.Foundation.Metadata.ActivatableAttribute

Details

Assembly

Windows.UI.StartScreen.dll