SecondaryTile.RequestCreateAsync(Point) | requestCreateAsync(Point) method

Applies to Windows and Windows Phone

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.

  • Applies to Windows Phone

Note  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 apps, 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.

Syntax


secondaryTile.requestCreateAsync(invocationPoint).done( /* Your success and error handlers */ );

Parameters

invocationPoint

Type: Point

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

Return value

Type: IAsyncOperation<Boolean>

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:

This method returns an asynchronous Boolean value through its IAsyncOperation.getResults method as shown here.


  
[JavaScript]  
oSecondaryTile.requestCreateAsync( { x:100, y:100 } ).then( function (isPinned) { } );      

[C#]  
async void showTileCreateRequest( SecondaryTile tile, Point pt )  
{      
    bool isPinned = await tile.requestCreateAsync( pt );  
}

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

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

Metadata

Windows.winmd

See also

SecondaryTile
RequestCreateAsync
Secondary tiles sample
Tile Update On Suspend sample

 

 

Show:
© 2014 Microsoft