SecondaryTile.RequestCreateForSelectionAsync | requestCreateForSelectionAsync methods

Applies to Windows and Windows Phone

Displays the Pin to Start flyout in relation to a specified rectangle. This flyout is used by the user to confirm that they want to create the secondary tile, which in turn creates the tile.
The Pin to Start flyout includes a preview of the secondary tile. If more than one version of the tile is available, the user can scroll through options in the flyout and select their choice. They can also provide their own display name for the tile. Finally, the user clicks a button in the flyout to confirm creation of 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.

Overload list

MethodDescription
RequestCreateForSelectionAsync(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.
RequestCreateForSelectionAsync(Rect, 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.

Remarks

This method places the Pin to Start flyout immediately adjacent to the rectangle specified in the method's parameters. When you specify the flyout's placement, you give a consistency to the experience and can ensure that the flyout is shown near what the user just clicked (generally an "Pin" button) so that the user action and the appearance of the flyout have a clear connection.

When the user invokes the Pin to Start flyout from an app bar at the bottom of the screen, you can use Windows.Popups.Placement.above to reliably position the flyout above the button.

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
Secondary tiles sample

 

 

Show:
© 2014 Microsoft