Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CreateOrUpdateSecondary

Creates a new secondary tile or updates an existing one.
Read time 2 minutesLast updated 13 hours ago

Definition

CreateOrUpdateSecondary(SecondaryTileData)

Creates a new secondary tile or updates an existing one.
public static Tile CreateOrUpdateSecondary(SecondaryTileData data)

Parameters

The data to create or update the secondary tile with. You must set
tileId
. When you create a tile, you must also set
displayName
.

Returns

Type

Description

TileThe tile that the method created or updated. Use it for further work with the tile.

Remarks

If a secondary tile with the same ID exists, the method updates it. You can't change the display name of an existing tile. If no tile with that ID exists, Windows shows a request to the user to pin the new tile to the Start screen, and creates the tile only if the user accepts.

CreateOrUpdateSecondary(SecondaryTileData, Vector2)

Creates a new secondary tile or updates an existing one, and shows any pin request at a screen position.
public static Tile CreateOrUpdateSecondary(SecondaryTileData data, Vector2 pos)

Parameters

The data to create or update the secondary tile with. You must set
tileId
. When you create a tile, you must also set
displayName
.

The screen coordinates to show the request at.

Returns

Type

Description

TileThe tile that the method created or updated. Use it for further work with the tile.

Remarks

If a secondary tile with the same ID exists, the method updates it. You can't change the display name of an existing tile. If no tile with that ID exists, Windows shows a request to the user to pin the new tile to the Start screen, and creates the tile only if the user accepts. Windows shows the request at
pos
.

CreateOrUpdateSecondary(SecondaryTileData, Rect)

Creates a new secondary tile or updates an existing one, and shows any pin request above a screen area.
public static Tile CreateOrUpdateSecondary(SecondaryTileData data, Rect area)

Parameters

The data to create or update the secondary tile with. You must set
tileId
. When you create a tile, you must also set
displayName
.

area

The screen area to show the request above.

Returns

Type

Description

TileThe tile that the method created or updated. Use it for further work with the tile.

Remarks

If a secondary tile with the same ID exists, the method updates it. You can't change the display name of an existing tile. If no tile with that ID exists, Windows shows a request to the user to pin the new tile to the Start screen, and creates the tile only if the user accepts. Windows shows the request above
area
.