SecondaryTile.RequestCreateAsync SecondaryTile.RequestCreateAsync SecondaryTile.RequestCreateAsync SecondaryTile.RequestCreateAsync SecondaryTile.RequestCreateAsync Method

Definition

Overloads

RequestCreateAsync() 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(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 8.x 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.

RequestCreateAsync(Point) RequestCreateAsync(Point) RequestCreateAsync(Point) RequestCreateAsync(Point) RequestCreateAsync(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 8.x 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.

RequestCreateAsync() 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(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 8.x 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<Platform::Boolean> RequestCreateAsync()
IAsyncOperation<bool> RequestCreateAsync() const;
public IAsyncOperation<bool> RequestCreateAsync()
Public Function RequestCreateAsync() As IAsyncOperation(Of bool)
Windows.UI.StartScreen.SecondaryTile.requestCreateAsync().done( /* Your success and error handlers */ );

Returns

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

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

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

RequestCreateAsync(Point) RequestCreateAsync(Point) RequestCreateAsync(Point) RequestCreateAsync(Point) RequestCreateAsync(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 8.x 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<Platform::Boolean> RequestCreateAsync(Point invocationPoint)
IAsyncOperation<bool> RequestCreateAsync(Point invocationPoint) const;
public IAsyncOperation<bool> RequestCreateAsync(Point invocationPoint)
Public Function RequestCreateAsync(invocationPoint As Point) As IAsyncOperation(Of bool)
Windows.UI.StartScreen.SecondaryTile.requestCreateAsync(invocationPoint).done( /* Your success and error handlers */ );

Parameters

invocationPoint
Point Point Point

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.