Skip to content

Latest commit

 

History

History
89 lines (66 loc) · 4.29 KB

File metadata and controls

89 lines (66 loc) · 4.29 KB
page_type languages products urlFragment extendedZipContent description
sample
csharp
cpp
cppwinrt
windows
windows-uwp
SecondaryTiles
path target
SharedContent
SharedContent
path target
LICENSE
LICENSE
Shows how to pin and use a secondary tile, which is a tile that directly accesses a specific section or experience within an app.

Secondary tiles sample

Shows how to pin and use a secondary tile, which is a tile that directly accesses a specific, non-default section or experience within an app, such as a saved game or a specific friend in a social networking app. Sections or experiences within an app that can be pinned to the Start screen as a secondary tile are chosen and exposed by the app, but the creation of the secondary tile is strictly up to the user.

Note: This sample is part of a large collection of UWP feature samples. You can download this sample as a standalone ZIP file from docs.microsoft.com, or you can download the entire collection as a single ZIP file, but be sure to unzip everything to access shared dependencies. For more info on working with the ZIP file, the samples collection, and GitHub, see Get the UWP samples from GitHub. For more samples, see the Samples portal on the Windows Dev Center.

This sample demonstrates the following scenarios:

  • Pinning a secondary tile to the Start screen
  • Removing a secondary tile from the Start screen
  • Enumerating all secondary tiles owned by the calling app
  • Determining whether a particular tile is currently pinned to the Start screen
  • Processing arguments when the app is activated through a secondary tile
  • Sending a local tile notification and badge notification to the secondary tile
  • Using the app bar to pin and unpin tiles
  • Updating the secondary tile's default logo

Note Some functionality in the sample requires that the tile can receive notifications. Tile notifications can be disabled by a user for a single app or for all apps, or by a system administrator by using group policy.

Related topics

Guidelines and checklist for secondary tiles
Quickstart: Pinning a secondary tile
Quickstart: Sending notifications to a secondary tile
SecondaryTile class
Secondary tiles overviews

System requirements

Client: Windows 10

Server: Windows Server 2016 Technical Preview

Phone: Windows 10

Build the sample

  1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
  2. Start Microsoft Visual Studio and select File > Open > Project/Solution.
  3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio Solution (.sln) file.
  4. Press Ctrl+Shift+B, or select Build > Build Solution.

Run the sample

The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.

Deploying the sample

  • Select Build > Deploy Solution.

Deploying and running the sample

  • To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or select Debug > Start Without Debugging.

##How to use the sample In some of the scenarios, you need to switch to the Start screen to see the effect of the scenario on the secondary tile. Click the sample tile to return to the main sample page or the secondary tile (in this sample, the secondary tile simply says "Windows SDK") to be taken into an area of the sample that confirms that you've launched it from a secondary tile.